Skip to content

Commit 746fcd3

Browse files
committed
Added hidden ID property "rigidBodyShape" setting
When this property is found in a selected object when running the Enable Rigid Bodies preprocessing tool, its value overrides the default collision shape for it with the value in the property. Possible values are: MESH, CONVEX_HULL, CONE, CYLINDER, CAPSULE, SPHERE, BOX.
1 parent 75465f0 commit 746fcd3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

kk_bullet_constraints_builder.zip

34 Bytes
Binary file not shown.

kk_bullet_constraints_builder/tools.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,11 @@ def tool_enableRigidBodies(scene):
928928
if grpName in bpy.data.groups:
929929
if obj.name in bpy.data.groups[grpName].objects:
930930
obj.rigid_body.type = 'PASSIVE'
931+
932+
# Set collision specific collision shape from object property
933+
for obj in objs:
934+
if "rigidBodyShape" in obj.keys():
935+
obj.rigid_body.collision_shape = obj["rigidBodyShape"]
931936

932937
# Revert to start selection
933938
for obj in selection: obj.select = 1

0 commit comments

Comments
 (0)