accept "cube" and "cuboid" as names for box collision primitives

This commit is contained in:
SleepKiller 2019-11-19 03:41:46 +13:00
parent 89e8193462
commit 478a4cba5a
1 changed files with 1 additions and 1 deletions

View File

@ -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!")