Добавлен импорт иерархии объектов из FreeCAD в Blender

This commit is contained in:
brothermechanic 2023-04-06 11:33:50 +00:00 committed by Igor Brylyov
parent 5208577d86
commit b744fe30a0
6 changed files with 70 additions and 23 deletions

View file

@ -19,10 +19,13 @@ logging.basicConfig(level=logging.INFO)
def asset_setup(transforms=True, sharpness=True, shading=True):
""" asset setup pipeline """
for ob in bpy.context.scene.objects:
#deselect all but just one object and make it active
if not ob.type == 'MESH':
continue
bpy.ops.object.select_all(action='DESELECT')
ob.select_set(state=True)
bpy.context.view_layer.objects.active = ob
# apply scale
apply_transforms(ob, location=False, rotation=False, scale=True)
if transforms:
# remove doubles