diff --git a/no_resize.py b/no_resize.py index 37a7b0c..513ad4e 100644 --- a/no_resize.py +++ b/no_resize.py @@ -174,15 +174,18 @@ def make3d4print_task(r): get_printsize_url = 'https://mp.api.suwa3d.com/api/printOrder/info' res = requests.get(f'{get_printsize_url}?id={orderId}') print('获取打印尺寸:', res.text) - # for f in res.json()['data']['fileList']: - # if "undefined" in f: - # continue - # try: - # height = float(f.split('_')[-2][:-2]) * 10 - # except Exception as e: - # print("eeee",e) - # bpy.ops.wm.quit_blender() - # return + objName = "" + for f in res.json()['data']['fileList']: + if "undefined" in f: + continue + try: + objName = f + break + except Exception as e: + print("eeee",e) + return + + print("obj尺寸名称",objName) # 如果指定文件夹目标文件存在,则先删除