添加上传逻辑检测

main
程祎 2023-11-22 19:07:37 +08:00
parent 5d8fd58bb4
commit 6952113750
1 changed files with 24 additions and 0 deletions

View File

@ -34,7 +34,9 @@ def parse_psd(path):
has_thumbnail = False
lines = {}
patch_stages = {}
spatch_stages = {}
bad_stages = {}
sbad_stages = {}
auto_stages = {}
#patch的末尾数字
@ -100,6 +102,13 @@ def parse_psd(path):
patch_stages[nArr[1]].append(nArr[2])
patch_end.append(item.name.replace("patch", ""))
elif nArr[0] == 'spatch':
if nArr[1] not in spatch_stages:
spatch_stages[nArr[1]] = []
spatch_stages[nArr[1]].append(f"{nArr[2]}_{nArr[3]}")
patch_end.append(item.name.replace("spatch", ""))
elif nArr[0] == 'bad':
if nArr[1] not in bad_stages:
bad_stages[nArr[1]] = []
@ -107,6 +116,13 @@ def parse_psd(path):
bad_stages[nArr[1]].append(nArr[2])
bad_end.append(item.name.replace("bad", ""))
elif nArr[0] == 'sbad':
if nArr[1] not in sbad_stages:
sbad_stages[nArr[1]] = []
sbad_stages[nArr[1]].append(f"{nArr[2]}_{nArr[3]}")
bad_end.append(item.name.replace("sbad", ""))
elif nArr[0] == 'auto':
if nArr[1] not in auto_stages:
auto_stages[nArr[1]] = []
@ -181,6 +197,14 @@ def parse_psd(path):
for item in patch_end:
if item not in bad_end:
log.append("拼图图层找不到bad图层patch{}".format(item))
for stage in spatch_stages:
tmp = {}
for item in spatch_stages[stage]:
if item in tmp:
log.append("存在重复图层spatch_{}_{}".format(stage, item))
else:
tmp[item] = 0
log.append("检测结束")