Fix #28865: Draw_bounds_type does not display Polyhedron or Capsule types
[blender.git] / source / blender / makesrna / intern / rna_object.c
index bc050f3a90254f3aa648b983b6c5dbceb5b0eba8..7e2700629ad37b8bcb213ed0ef6b846861d59056 100644 (file)
@@ -948,10 +948,10 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
                if (ob->type == OB_MESH) {
                        /* this is needed to refresh the derived meshes draw func */
                        DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
-                       WM_main_add_notifier(NC_OBJECT|ND_DRAW, ptr->id.data);
                }
        }
 
+       WM_main_add_notifier(NC_OBJECT|ND_DRAW, ptr->id.data);
 }
 
 static PointerRNA rna_Object_active_particle_system_get(PointerRNA *ptr)
@@ -1532,9 +1532,10 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
        prop= RNA_def_property(srna, "use_collision_bounds", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_BOUNDS);
        RNA_def_property_ui_text(prop, "Use Collision Bounds", "Specify a collision bounds type other than the default");
+       RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
        prop= RNA_def_property(srna, "collision_bounds_type", PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_sdna(prop, NULL, "boundtype");
+       RNA_def_property_enum_sdna(prop, NULL, "collision_boundtype");
        RNA_def_property_enum_items(prop, collision_bounds_items);
        RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_collision_bounds_itemf");
        RNA_def_property_ui_text(prop, "Collision Bounds",  "Select the collision type");
@@ -1803,8 +1804,6 @@ static void rna_def_object(BlenderRNA *brna)
                {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", "Draw bounds as sphere"},
                {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", "Draw bounds as cylinder"},
                {OB_BOUND_CONE, "CONE", 0, "Cone", "Draw bounds as cone"},
-               {OB_BOUND_TRIANGLE_MESH, "POLYHEDRON", 0, "Polyhedron", "Draw bounds as polyhedron"},
-               {OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", "Draw bounds as capsule"},
                {0, NULL, 0, NULL, NULL}};
 
        static EnumPropertyItem dupli_items[] = {