diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 0e7df0df8ad..e3cf9af6c39 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -869,20 +869,27 @@ static int rna_GameObjectSettings_physics_type_get(PointerRNA *ptr) if (!(ob->gameflag & OB_COLLISION)) { if (ob->gameflag & OB_OCCLUDER) { ob->body_type = OB_BODY_TYPE_OCCLUDER; - } else if (ob->gameflag & OB_NAVMESH){ + } + else if (ob->gameflag & OB_NAVMESH) { ob->body_type = OB_BODY_TYPE_NAVMESH; - } else { + } + else { ob->body_type = OB_BODY_TYPE_NO_COLLISION; } - } else if (ob->gameflag & OB_SENSOR) { + } + else if (ob->gameflag & OB_SENSOR) { ob->body_type = OB_BODY_TYPE_SENSOR; - } else if (!(ob->gameflag & OB_DYNAMIC)) { + } + else if (!(ob->gameflag & OB_DYNAMIC)) { ob->body_type = OB_BODY_TYPE_STATIC; - } else if (!(ob->gameflag & (OB_RIGID_BODY|OB_SOFT_BODY))) { + } + else if (!(ob->gameflag & (OB_RIGID_BODY|OB_SOFT_BODY))) { ob->body_type = OB_BODY_TYPE_DYNAMIC; - } else if (ob->gameflag & OB_RIGID_BODY) { + } + else if (ob->gameflag & OB_RIGID_BODY) { ob->body_type = OB_BODY_TYPE_RIGID; - } else { + } + else { ob->body_type = OB_BODY_TYPE_SOFT; /* create the structure here because we display soft body buttons in the main panel */ if (!ob->bsoft) |