Sfoglia il codice sorgente

Merge pull request #188 from rcorre/texture_copy_fix

Skip copying a texture if the file exists.
Lu Jiacheng 6 anni fa
parent
commit
18d52337c1

+ 2 - 1
io_scene_godot/converters/material_node_tree/exporters.py

@@ -44,7 +44,8 @@ def export_texture(escn_file, export_settings, image):
             src_path = bpy.path.abspath(image.filepath_raw)
         else:
             src_path = image.filepath_raw
-        copyfile(src_path, dst_path)
+        if os.path.abspath(src_path) != os.path.abspath(dst_path):
+            copyfile(src_path, dst_path)
 
     img_resource = ExternalResource(dst_path, "Texture")
     return escn_file.add_external_resource(img_resource, image)