优化
This commit is contained in:
1 parent
3197efd6a3
commit
46dacc2f7c
7 files changed
+62
-13
No files matched your search
+9
-1
@@ -58,8 +58,14 @@ def detect_markers(psid, pid):
|
||||
|
||||
start_time = time.time()
|
||||
add_photo3 = ' '
|
||||
textpicCmd = ' '
|
||||
if os.path.exists(os.path.join(config.workdir, pid, 'photo3')):
|
||||
add_photo3 = ' -addFolder "' + os.path.join(config.workdir, pid, 'photo3') + '" '
|
||||
|
||||
textpicCmd ='-selectImage "'+os.path.join(config.workdir,pid,'photo3')+'\*" -enableTexturingAndColoring true'
|
||||
textpicCmd ='-selectImage "'+os.path.join(config.workdir,pid,'photo2')+'\*" -enableTexturingAndColoring false'
|
||||
else:
|
||||
textpicCmd ='-selectImage "'+os.path.join(config.workdir,pid,'photo2')+'\*" -enableTexturingAndColoring true'
|
||||
|
||||
cmd = f'{config.rcbin} {config.r2["init"]} -setInstanceName {pid} \
|
||||
-save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" \
|
||||
@@ -70,7 +76,7 @@ def detect_markers(psid, pid):
|
||||
-exportXMP "D:\\make2\\config\\exportXMP.config.xml" \
|
||||
-exportControlPointsMeasurements "{os.path.join(config.workdir, pid, f"{pid}.controlPoints.csv")}" "D:\\make2\\config\\exportControlPoints.config.xml" \
|
||||
-exportReconstructionRegion "{os.path.join(config.workdir, pid, f"{pid}.rcbox")}" \
|
||||
-save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -quit'
|
||||
{textpicCmd} -save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -quit'
|
||||
print(cmd)
|
||||
cmd = shlex.split(cmd)
|
||||
res = subprocess.run(cmd)
|
||||
@@ -182,6 +188,8 @@ def step1(pid, experience=False, makeloop=True,task_distributed_id="",isNoColorT
|
||||
libs.set_photo_join_type(config.workdir, pid, 'photo2', camcerIndex, mesh='0', texture='0')
|
||||
|
||||
|
||||
#移除当前文件夹
|
||||
shutil.rmtree(os.path.join(config.workdir, pid))
|
||||
# TODO: 更新本地step1任务状态,加入step2任务队列
|
||||
if task_distributed_id == "":#不是分布式任务的时候就自动往下个步骤走,是分布式任务的时候就就执行当前任务
|
||||
if makeloop:
|
||||
|
||||
Reference in new issue
Block a user