Fold 3D models¶
Fold 3D models¶
1# This example folds all the 3d models in all the 3d layers in the active drawing.
2
3for layer in impact.active_drawing.layers:
4 if layer.layer_type == "THREE_D":
5 scene = layer.scene
6
7 if not scene.isNone():
8 for instance in scene.instances:
9 object = instance.object()
10
11 if not object.isNone():
12 if object.type == ip3DObjectType.ot3DModel:
13 model = object
14 model.fold()
15
16 else:
17 impact.gui.output_toolbox.add("No 3d scene")
18