| 31 | # activate when need to triangulate the meshes |
| 32 | |
| 33 | def triangulate_mesh_with_pyblender(instance_dir): |
| 34 | blender_script_path = os.path.join(current_dir, 'blender_triangulate.py') |
| 35 | subprocess.run(['blender', '--factory-startup', '--background', '--python', blender_script_path, '--', os.path.join(current_dir, instance_dir, 'partA.obj'), os.path.join(current_dir, instance_dir, 'partA_tri.obj')]) |
| 36 | subprocess.run(['blender','--factory-startup', '--background', '--python', blender_script_path, '--', os.path.join(current_dir, instance_dir, 'partB.obj'), os.path.join(current_dir, instance_dir, 'partB_tri.obj')]) |
| 37 | |
| 38 | |
| 39 | |