accept "cube" and "cuboid" as names for box collision primitives
This commit is contained in:
parent
89e8193462
commit
478a4cba5a
|
@ -204,7 +204,7 @@ def get_collision_primitive_shape(obj: bpy.types.Object) -> CollisionPrimitiveSh
|
||||||
return CollisionPrimitiveShape.SPHERE
|
return CollisionPrimitiveShape.SPHERE
|
||||||
if "cylinder" in name or "cyln" in name or "cyl" in name:
|
if "cylinder" in name or "cyln" in name or "cyl" in name:
|
||||||
return CollisionPrimitiveShape.CYLINDER
|
return CollisionPrimitiveShape.CYLINDER
|
||||||
if "box" in name: # TODO: Accept cube, cuboid
|
if "box" in name or "cube" in name or "cuboid" in name:
|
||||||
return CollisionPrimitiveShape.BOX
|
return CollisionPrimitiveShape.BOX
|
||||||
|
|
||||||
raise RuntimeError(f"Object '{obj.name}' has no primitive type specified in it's name!")
|
raise RuntimeError(f"Object '{obj.name}' has no primitive type specified in it's name!")
|
||||||
|
|
Loading…
Reference in New Issue