|
|
|
@ -165,6 +165,24 @@ def step2(pid,headsCount): |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid:{pid} - 建模完成状态变更失败 - {e}') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid:{pid} - 建模完成状态变更失败 - {e}') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#做xmps的坐标 |
|
|
|
|
|
|
|
def getXmps(pid): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#从共享盘上下载对齐信息,判断是否有 |
|
|
|
|
|
|
|
print(f"判断是否存在 {os.path.join(config.sharedir, 'xmps_rate','texture')} -- {os.path.exists(os.path.join(config.sharedir, 'xmps_rate','texture'))}") |
|
|
|
|
|
|
|
if os.path.exists(os.path.join(config.workdir, 'xmps','texture')) == False or os.path.exists(os.path.join(config.workdir, 'xmps','mesh')) == False: |
|
|
|
|
|
|
|
print(f"检测不到对齐坐标,请先人工建一次模进行对齐,创建坐标,创建制定的坐标到 {os.path.join(config.workdir, 'xmps_rate','mesh')} 和 os.path.join(config.workdir, 'xmps_rate','texture')") |
|
|
|
|
|
|
|
return False |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
#将共享盘的对齐信息复制到工作目录,photo1 和 photo2 |
|
|
|
|
|
|
|
shutil.copytree(os.path.join(config.workdir, 'xmps_rate','mesh'), os.path.join(config.workdir, pid, 'photo1'),dirs_exist_ok=True) |
|
|
|
|
|
|
|
shutil.copytree(os.path.join(config.workdir, 'xmps_rate','texture'), os.path.join(config.workdir, pid, 'photo2'),dirs_exist_ok=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(pid,headsCount): |
|
|
|
def main(pid,headsCount): |
|
|
|
step1(pid, headsCount) |
|
|
|
step1(pid, headsCount) |
|
|
|
|
|
|
|
|
|
|
|
@ -212,6 +230,11 @@ if __name__ == '__main__': |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 建模任务循环开始,{needBuildDir}') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 建模任务循环开始,{needBuildDir}') |
|
|
|
for pid in os.listdir(needBuildDir): |
|
|
|
for pid in os.listdir(needBuildDir): |
|
|
|
print("pid=",pid) |
|
|
|
print("pid=",pid) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = getXmps(pid) |
|
|
|
|
|
|
|
if res == False: |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
|
|
|
|
if not os.path.isdir(os.path.join(needBuildDir,pid)): |
|
|
|
if not os.path.isdir(os.path.join(needBuildDir,pid)): |
|
|
|
continue |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
|