2
This commit is contained in:
1 parent
1db36e9f34
commit
2951906785
2 files changed
+20
-18
No files matched your search
+14
-12
@@ -43,6 +43,8 @@ def find_pid_objname(pid):
|
||||
if obj.name.startswith(str(pid)):
|
||||
return obj.name
|
||||
|
||||
|
||||
|
||||
#加载obj文件
|
||||
def reload_obj(pid):
|
||||
|
||||
@@ -50,18 +52,18 @@ def reload_obj(pid):
|
||||
libs.down_obj_from_oss(config.workdir, pid, "print")
|
||||
# obj = reload_obj(pid, action)
|
||||
#执行获取obj缩略图
|
||||
print("执行获取obj全身缩略图脚本")
|
||||
os.system(f'python d:\\make2\\tools\pic_for_obj\image_rander_small.py -pid {pid} -i D://print/{pid} -o D://print/{pid}')
|
||||
#判断文件是否存在,存在则上传到oss, 更新数据库内容
|
||||
if os.path.exists(f'D://print/{pid}/{pid}_pic.png'):
|
||||
#获取拍照订单的信息,从中得到拍照订单的信息
|
||||
imagePathT = get_p3d_info(str(pid))
|
||||
if imagePathT != 0:
|
||||
print("imagePathT",imagePathT)
|
||||
config.oss_bucket_website.put_object_from_file(f'{imagePathT}', f'D://print/{pid}/{pid}_pic.png')
|
||||
#请求接口
|
||||
res = requests.post("https://mp.api.suwa3d.com/api/printOrder/updateCoverByPidForExternalOrder", data={'pid': pid, 'image_path': 'https://www.suwa3d.com/'+imagePathT})
|
||||
print("res",res)
|
||||
# print("执行获取obj全身缩略图脚本")
|
||||
# os.system(f'python d:\\make2\\tools\pic_for_obj\image_rander_small.py -pid {pid} -i D://print/{pid} -o D://print/{pid}')
|
||||
# #判断文件是否存在,存在则上传到oss, 更新数据库内容
|
||||
# if os.path.exists(f'D://print/{pid}/{pid}_pic.png'):
|
||||
# #获取拍照订单的信息,从中得到拍照订单的信息
|
||||
# imagePathT = get_p3d_info(str(pid))
|
||||
# if imagePathT != 0:
|
||||
# print("imagePathT",imagePathT)
|
||||
# config.oss_bucket_website.put_object_from_file(f'{imagePathT}', f'D://print/{pid}/{pid}_pic.png')
|
||||
# #请求接口
|
||||
# res = requests.post("https://mp.api.suwa3d.com/api/printOrder/updateCoverByPidForExternalOrder", data={'pid': pid, 'image_path': 'https://www.suwa3d.com/'+imagePathT})
|
||||
# print("res",res)
|
||||
|
||||
obj_filename = os.path.join(config.workdir,'print',pid,f'{pid}.obj')
|
||||
bpy.ops.wm.read_homefile()
|
||||
|
||||
@@ -48,14 +48,14 @@ def readTask(key):
|
||||
pid = pid.decode('utf-8')
|
||||
|
||||
#判断影棚类型
|
||||
ps_type = get_ps_type(pid)
|
||||
if ps_type == 2:
|
||||
#ps_type = get_ps_type(pid)
|
||||
#if ps_type == 2:
|
||||
#方形影棚
|
||||
# r.rpush('ai:ai_repeat_build',pid)
|
||||
r.rpush('ai:ai_repeat_build',pid)
|
||||
print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())+"-方形影棚数据推入到新的建模方式的重建队列")
|
||||
common.notify("方形影棚数据推入到新的建模方式的重建队列 (ai:ai_repeat_build),pid="+pid)
|
||||
return
|
||||
r.rpush('ai:ai_repeat_build',pid)
|
||||
#print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())+"-方形影棚数据推入到新的建模方式的重建队列")
|
||||
common.notify("推入到新的建模方式的重建队列 (ai:ai_repeat_build),pid="+pid)
|
||||
return
|
||||
psid = getPSid(pid)
|
||||
|
||||
#判断是否走新的建模系统 2023-11-10 全部走新的建模系统
|
||||
|
||||
Reference in new issue
Block a user