This commit is contained in:
dongchangxi committed 2025-07-01 10:01:35 +08:00
1 parent 6779b08fa8
commit 6117a5f49d
4 files changed
+19 -14

No files matched your search

+3 -3
View File
@@ -86,7 +86,7 @@ def rander_image_and_check(args):
"""渲染图片"""
# 列出obj列表
pid = args.pid
pid_file_dir = os.path.join(args.input,pid)
pid_file_dir = os.path.join(args.input)
if not os.path.exists(pid_file_dir):
print(f"不存在{pid_file_dir}")
return
@@ -125,10 +125,10 @@ def rander_image_and_check(args):
start_import = time.time()
print("===============", os.path.join(args.input, pid, obj_file))
with stdout_redirected(to=os.devnull):
bpy.ops.import_scene.obj(filepath=os.path.join(args.input, pid, obj_file))
bpy.ops.import_scene.obj(filepath=os.path.join(args.input, obj_file))
print(
f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())}: import pid: {pid} done in {time.time() - start_import:.2f}s')
texture_path = os.path.join(args.input, pid, texture_file)
texture_path = os.path.join(args.input,texture_file)
materials = bpy.data.materials
for material in materials:
# 确保材质使用节点树