From 900b3e2df41cf25d180b3dee48d6482f672bae8d Mon Sep 17 00:00:00 2001 From: cakipaul Date: Thu, 30 Jan 2025 22:01:57 +0800 Subject: [PATCH] =?UTF-8?q?gif=20importer=20=E5=AE=89=E5=85=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=9A=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D=E5=AF=BC?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/gif-importer/importer_plugin.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/gif-importer/importer_plugin.gd b/addons/gif-importer/importer_plugin.gd index 80a639b4..d0213a5a 100644 --- a/addons/gif-importer/importer_plugin.gd +++ b/addons/gif-importer/importer_plugin.gd @@ -78,7 +78,9 @@ func _import(source_file, save_path, options, platform_variants, gen_files): var animation_name = source_file.get_file().replace(".gif", "") var dir_name = base_dir + "/" + animation_name + "/" if DirAccess.dir_exists_absolute(dir_name): - DirAccess.remove_absolute(dir_name) + # 如果文件夹存在,就不再重新导入 + # 也就是说,重新导入的前提是删除 gif 同名文件夹 + return code DirAccess.make_dir_absolute(dir_name) var sprite_frames_path = base_dir + "/frames.tres" var sprite_frames: SpriteFrames