Explorar o código

Merge pull request #188 from rcorre/texture_copy_fix

Skip copying a texture if the file exists.
Lu Jiacheng %!s(int64=6) %!d(string=hai) anos
pai
achega
18d52337c1
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      io_scene_godot/converters/material_node_tree/exporters.py

+ 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)