|
|
|
|
@ -27,8 +27,8 @@ def get_xmps(psid,pid):
@@ -27,8 +27,8 @@ def get_xmps(psid,pid):
|
|
|
|
|
if file.key.endswith('.xmp'): |
|
|
|
|
filename = file.key.split('/')[-1] |
|
|
|
|
print('正在下载:', file.key) |
|
|
|
|
# os.makedirs(os.path.join(config.sharedir, 'xmps_new_studio_rate', psid, 'texture'), exist_ok=True) |
|
|
|
|
config.oss_bucket.get_object_to_file(file.key, os.path.join(config.sharedir,'xmps_new_studio_rate', 'texture', filename)) |
|
|
|
|
os.makedirs(os.path.join(config.sharedir, 'xmps_new_studio_rate', psid, 'texture'), exist_ok=True) |
|
|
|
|
config.oss_bucket.get_object_to_file(file.key, os.path.join(config.sharedir,'xmps_new_studio_rate',psid, 'texture', filename)) |
|
|
|
|
|
|
|
|
|
#将共享盘的对齐信息复制到工作目录,photo1 和 photo2 |
|
|
|
|
# shutil.copytree(os.path.join(config.sharedir, 'xmps_new_studio_rate', psid, 'mesh'), os.path.join(config.workdir, pid, 'photo1'),dirs_exist_ok=True) |
|
|
|
|
@ -44,7 +44,6 @@ def get_xmps(psid,pid):
@@ -44,7 +44,6 @@ def get_xmps(psid,pid):
|
|
|
|
|
def get_photo2_align_info(pid): |
|
|
|
|
pid = str(pid) |
|
|
|
|
psid = libs.getPSid(pid) |
|
|
|
|
|
|
|
|
|
#判断是否存在该目录 |
|
|
|
|
if os.path.exists(os.path.join(config.workdir, pid)) == False: |
|
|
|
|
#下载照片 |
|
|
|
|
@ -60,16 +59,16 @@ def get_photo2_align_info(pid):
@@ -60,16 +59,16 @@ def get_photo2_align_info(pid):
|
|
|
|
|
photosNums = len(os.listdir(os.path.join(config.workdir, pid, "photo2"))) |
|
|
|
|
#判断是否存在该目录 |
|
|
|
|
print(f"影棚号:{psid} , {config.oss_bucket.object_exists(f'xmps_new_studio_rate/{psid}/')}") |
|
|
|
|
#filename = f'xmps_new_studio_rate/{psid}/{psid}.rcbox' |
|
|
|
|
filename = f'xmps_new_studio_rate/{psid}/{psid}.rcbox' |
|
|
|
|
isRate = False |
|
|
|
|
# if not config.oss_bucket.object_exists(filename): |
|
|
|
|
# #提示是否进行 xmps_new_studio_rate 文件夹的创建 |
|
|
|
|
# yes_or_not = input('当前该影棚没有对应的对齐坐标,是否创建?(y/n)') |
|
|
|
|
# if yes_or_not == 'y': |
|
|
|
|
# tools_to_xmps.create_rate_xmps(pid) |
|
|
|
|
# isRate = True |
|
|
|
|
# else: |
|
|
|
|
# sys.exit(0) |
|
|
|
|
if not config.oss_bucket.object_exists(filename): |
|
|
|
|
#提示是否进行 xmps_new_studio_rate 文件夹的创建 |
|
|
|
|
yes_or_not = input('当前该影棚没有对应的对齐坐标,是否创建?(y/n)') |
|
|
|
|
if yes_or_not == 'y': |
|
|
|
|
tools_to_xmps.create_rate_xmps(pid) |
|
|
|
|
isRate = True |
|
|
|
|
else: |
|
|
|
|
sys.exit(0) |
|
|
|
|
|
|
|
|
|
#旋转图片 |
|
|
|
|
if isRate == False: |
|
|
|
|
@ -77,7 +76,7 @@ def get_photo2_align_info(pid):
@@ -77,7 +76,7 @@ def get_photo2_align_info(pid):
|
|
|
|
|
tools_to_xmps.rateImages(pid) |
|
|
|
|
|
|
|
|
|
#下载对齐信息 |
|
|
|
|
#get_xmps(psid,pid) |
|
|
|
|
get_xmps(psid,pid) |
|
|
|
|
|
|
|
|
|
#执行对齐指令 |
|
|
|
|
cmd = f'{config.rcbin} {config.r2["init"]} -setInstanceName {pid} \ |
|
|
|
|
|