程序优化

This commit is contained in:
dongchangxi committed 2023-12-09 15:47:49 +08:00
1 parent e83deda268
commit e1a7647fcb
16 files changed
+634 -91

No files matched your search

+6 -2
View File
@@ -6,7 +6,7 @@ if platform.system() == 'Windows':
#sys.path.append('libs')
else:
sys.path.append('/data/deploy/make3d/make2/libs/')
import config, libs, libs_db,main_service_db,common
import config, libs, libs_db,main_service_db,common,foot_mark_seam
def bmesh_copy_from_object(obj, transform=True, triangulate=True, apply_modifiers=False):
"""Returns a transformed, triangulated copy of the mesh"""
@@ -88,6 +88,10 @@ def base_fix(pid):
bpy.context.object.location[0] = 0
bpy.context.object.location[1] = 0
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
#处理脚底UV
# basepath = os.path.join(config.workdir, pid, 'output')
# foot_mark_seam.get_obj_max_foot(basepath,os.path.join(basepath, f'{pid}.obj'),os.path.join(basepath, f'{pid}.jpg'))
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 模型基础校正完成,共费时{libs.diff_time(start_time)}')
@@ -153,7 +157,7 @@ def export_and_update_glbs(pid):
# f.close()
# 先生成审核模型
faces_dest = 300000 * headcount
faces_dest = 500000 * headcount
# 减面
faces_current = len(bpy.data.objects[pid_objname].data.polygons)
print(f'当前面数:{faces_current},目标面数:{faces_dest}')