From 478a4cba5adfb49b792b0899b95fa83a391ba481 Mon Sep 17 00:00:00 2001 From: SleepKiller Date: Tue, 19 Nov 2019 03:41:46 +1300 Subject: [PATCH] accept "cube" and "cuboid" as names for box collision primitives --- addons/io_scene_swbf_msh/msh_model_gather.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/io_scene_swbf_msh/msh_model_gather.py b/addons/io_scene_swbf_msh/msh_model_gather.py index 34792a5..37ac6a5 100644 --- a/addons/io_scene_swbf_msh/msh_model_gather.py +++ b/addons/io_scene_swbf_msh/msh_model_gather.py @@ -204,7 +204,7 @@ def get_collision_primitive_shape(obj: bpy.types.Object) -> CollisionPrimitiveSh return CollisionPrimitiveShape.SPHERE if "cylinder" in name or "cyln" in name or "cyl" in name: 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 raise RuntimeError(f"Object '{obj.name}' has no primitive type specified in it's name!")