Skip to content
Snippets Groups Projects
Commit 978e50de authored by Candoran2's avatar Candoran2 Committed by neomonkeus
Browse files

Changed texture import so that original nif texture path is preserved if file...

Changed texture import so that original nif texture path is preserved if file is not found, allowing re-export with working textures.
parent 49a4ac08
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,7 @@ class TextureLoader:
except:
NifLog.warn(f"Texture '{name}' not found or not supported and no alternate available")
b_image = bpy.data.images.new(name=name, width=1, height=1, alpha=True)
b_image.filepath=tex_path
else:
b_image = bpy.data.images[name]
return b_image
......@@ -286,6 +287,6 @@ class TextureLoader:
return self.load_image(tex)
else:
tex = os.path.join(search_path_list[0], fn)
tex = fn
# probably not found, but load a dummy regardless
return self.load_image(tex)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment