From dad4886ce68f3385694984a3e99ebf8c77f96c3d Mon Sep 17 00:00:00 2001 From: ZhuoZhou Date: Fri, 18 Apr 2025 18:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tools/psd_convert/parse_psd.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/FindVerticalBundleBuilder/Tools/psd_convert/parse_psd.py b/FindVerticalBundleBuilder/Tools/psd_convert/parse_psd.py index 4188c8d..0e9728f 100644 --- a/FindVerticalBundleBuilder/Tools/psd_convert/parse_psd.py +++ b/FindVerticalBundleBuilder/Tools/psd_convert/parse_psd.py @@ -67,7 +67,9 @@ def run(psd_path, levels_output_dir, thumbnail_output_dir): level_info_json_data = {} level_info_json_data[json_level_id] = psd_name piece_list = [] - + titem_out_path = os.path.join(levels_output_dir, 'titem') + if not os.path.exists(titem_out_path): + os.mkdir(titem_out_path) for layer in psd: layer.visible = True @@ -75,9 +77,6 @@ def run(psd_path, levels_output_dir, thumbnail_output_dir): # layer.visible = False continue if layer.name == titem_group and layer.is_group(): - titem_out_path = os.path.join(levels_output_dir, 'titem') - if not os.path.exists(titem_out_path): - os.mkdir(titem_out_path) for item_layer in layer: piece_data = {} item_layer.visible = True @@ -215,10 +214,10 @@ def parse_psd(path, output_root, specific_files, platform): if __name__ == "__main__": - pass + # pass # PSD测试方法 # parse_psd(sys.argv[1], sys.argv[2], []) # print(os.getcwd()) # print(os.path.curdir) - # psd_path = "./CheckPsd/thebrown_hcq20231212_2.psd" - # run(psd_path,'./test','./test/thu') \ No newline at end of file + psd_path = "./CheckPsd/tidyup_ws20250418_1.psd" + run(psd_path,'./test','./test/thu') \ No newline at end of file