dongchangxi 11 months ago
parent
commit
298be82317
  1. 4
      manual_service.py
  2. 8
      new_studio_to_reg/get_new_studio_reg_info.py

4
manual_service.py

@ -59,12 +59,12 @@ def cmd_run(pid,usePhoto = "1",lock=False): @@ -59,12 +59,12 @@ def cmd_run(pid,usePhoto = "1",lock=False):
if lock:
exportxmp = ' -exportXMP "D:\\make2\\config\\exportXMP.config.lock.xml" '
else:
exportxmp = ' -exportXMP "D:\\make2\\config\\exportXMP.config.xml" '
exportxmp = ' -exportXMP "D:\\make2\\config\\exportXMP.config.lock.xml" '
usePhoto = "photo"+str(usePhoto)
#执行命令
cmd = f'{config.rcbin} {config.r2["init"]} -setInstanceName "{pid}" \
cmd = f'{config.rcbin} -setInstanceName "{pid}" \
-save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" \
-addFolder "{os.path.join(config.workdir, pid, usePhoto)}" -selectAllImages \
-detectMarkers "D:\\make2\\config\\detectMarkers.config.xml" \

8
new_studio_to_reg/get_new_studio_reg_info.py

@ -55,12 +55,12 @@ def get_photo2_align_info(pid): @@ -55,12 +55,12 @@ def get_photo2_align_info(pid):
#下载照片
libs.down_from_oss_photo2(config.oss_bucket, config.workdir, pid)
#判断对齐的图片数量和photo2的数量是否一致,不一致要进行通知处理
photosNums = len(os.listdir(os.path.join(config.workdir, pid, "photo2")))
#判断是否存在该目录
filename = f'xmps_new_studio_rate/{psid}/texture/11_2.xmp'
print(f"影棚号:{psid} , {config.oss_bucket.object_exists(filename)}")
isRate = False
photosNums = 0
if not config.oss_bucket.object_exists(filename):
# #提示是否进行 xmps_new_studio_rate 文件夹的创建
# yes_or_not = input('当前该影棚没有对应的对齐坐标,是否创建?(y/n)')
@ -69,6 +69,7 @@ def get_photo2_align_info(pid): @@ -69,6 +69,7 @@ def get_photo2_align_info(pid):
# isRate = True
# else:
# sys.exit(0)
photosNums = len(os.listdir(os.path.join(config.workdir, pid, "photo2")))
tools_to_xmps.create_rate_xmps(pid)
isRate = True
@ -76,7 +77,8 @@ def get_photo2_align_info(pid): @@ -76,7 +77,8 @@ def get_photo2_align_info(pid):
if isRate == False:
print(f"旋转图片:{pid}")
tools_to_xmps.rateImages(pid)
#判断对齐的图片数量和photo2的数量是否一致,不一致要进行通知处理
photosNums = len(os.listdir(os.path.join(config.workdir, pid, "photo2")))
#下载对齐信息
get_xmps(psid,pid)

Loading…
Cancel
Save