修改部分逻辑
parent
823a4bac52
commit
dad4886ce6
|
|
@ -67,7 +67,9 @@ def run(psd_path, levels_output_dir, thumbnail_output_dir):
|
||||||
level_info_json_data = {}
|
level_info_json_data = {}
|
||||||
level_info_json_data[json_level_id] = psd_name
|
level_info_json_data[json_level_id] = psd_name
|
||||||
piece_list = []
|
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:
|
for layer in psd:
|
||||||
layer.visible = True
|
layer.visible = True
|
||||||
|
|
@ -75,9 +77,6 @@ def run(psd_path, levels_output_dir, thumbnail_output_dir):
|
||||||
# layer.visible = False
|
# layer.visible = False
|
||||||
continue
|
continue
|
||||||
if layer.name == titem_group and layer.is_group():
|
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:
|
for item_layer in layer:
|
||||||
piece_data = {}
|
piece_data = {}
|
||||||
item_layer.visible = True
|
item_layer.visible = True
|
||||||
|
|
@ -215,10 +214,10 @@ def parse_psd(path, output_root, specific_files, platform):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
pass
|
# pass
|
||||||
# PSD测试方法
|
# PSD测试方法
|
||||||
# parse_psd(sys.argv[1], sys.argv[2], [])
|
# parse_psd(sys.argv[1], sys.argv[2], [])
|
||||||
# print(os.getcwd())
|
# print(os.getcwd())
|
||||||
# print(os.path.curdir)
|
# print(os.path.curdir)
|
||||||
# psd_path = "./CheckPsd/thebrown_hcq20231212_2.psd"
|
psd_path = "./CheckPsd/tidyup_ws20250418_1.psd"
|
||||||
# run(psd_path,'./test','./test/thu')
|
run(psd_path,'./test','./test/thu')
|
||||||
Loading…
Reference in New Issue