修改部分逻辑

main
ZhuoZhou 2025-04-18 18:26:23 +08:00
parent 823a4bac52
commit dad4886ce6
1 changed files with 6 additions and 7 deletions

View File

@ -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')
psd_path = "./CheckPsd/tidyup_ws20250418_1.psd"
run(psd_path,'./test','./test/thu')