Skip to content
Snippets Groups Projects
Commit 02158e4b authored by Sergey Sharybin's avatar Sergey Sharybin
Browse files

Fix #28818: Error when trying to import obj

Fix #28816: Error when importing obj file with texture due to api change

Update obj importer and xcf importer to use new post-texface api.
parent f3070e7e
No related branches found
No related tags found
No related merge requests found
...@@ -354,7 +354,6 @@ def main(File, Path, LayerViewers, MixerViewers, LayerOffset,\ ...@@ -354,7 +354,6 @@ def main(File, Path, LayerViewers, MixerViewers, LayerOffset,\
UVFace = Active.data.uv_textures[0].data[0] UVFace = Active.data.uv_textures[0].data[0]
UVFace.image = Img UVFace.image = Img
UVFace.use_image = True
Tex.image = Img Tex.image = Img
...@@ -377,7 +376,6 @@ def main(File, Path, LayerViewers, MixerViewers, LayerOffset,\ ...@@ -377,7 +376,6 @@ def main(File, Path, LayerViewers, MixerViewers, LayerOffset,\
UVFace = Active.data.uv_textures[0].data[0] UVFace = Active.data.uv_textures[0].data[0]
UVFace.image = Img UVFace.image = Img
UVFace.use_image = True
Tex.image = Img Tex.image = Img
......
...@@ -619,9 +619,8 @@ def create_mesh(new_objects, ...@@ -619,9 +619,8 @@ def create_mesh(new_objects,
image, has_data = unique_material_images[context_material] image, has_data = unique_material_images[context_material]
if image: # Can be none if the material dosnt have an image. if image: # Can be none if the material dosnt have an image.
blender_tface.image = image blender_tface.image = image
blender_tface.use_image = True
if has_data and image.depth == 32: if has_data and image.depth == 32:
blender_tface.blend_type = 'ALPHA' blender_tface.alpha_blend = 'ALPHA'
# BUG - Evil eekadoodle problem where faces that have vert index 0 location at 3 or 4 are shuffled. # BUG - Evil eekadoodle problem where faces that have vert index 0 location at 3 or 4 are shuffled.
if len(face_vert_loc_indices) == 4: if len(face_vert_loc_indices) == 4:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment