mirror of
https://github.com/godotengine/godot-blender-exporter.git
synced 2026-01-04 14:09:56 +03:00
Merge pull request #309 from Ben1138/fix_node_tree_crash
Fix crash for potential non existent texture images.
This commit is contained in:
@@ -429,7 +429,10 @@ def export_texture(escn_file, export_settings, image):
|
||||
else:
|
||||
src_path = image.filepath_raw
|
||||
if os.path.normpath(src_path) != os.path.normpath(dst_path):
|
||||
copyfile(src_path, dst_path)
|
||||
if not os.path.exists(src_path):
|
||||
logging.warning("Texture Image '%s' does not exist!", src_path)
|
||||
else:
|
||||
copyfile(src_path, dst_path)
|
||||
|
||||
img_resource = ExternalResource(dst_path, "Texture")
|
||||
return escn_file.add_external_resource(img_resource, image)
|
||||
|
||||
Reference in New Issue
Block a user