Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergej Reich <sergej.reich@googlemail.com>2013-02-05 03:50:34 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-02-05 03:50:34 +0400
commit9d8ec8b30f5d07155912b76127e44df5da8c27b6 (patch)
tree612e85c04a32e1b7a81f9931c763d2862a5b522a /source/blender/makesrna/intern/rna_rigidbody.c
parentae27a548f87e938facffc02f015e4a11d45f24cd (diff)
rigidbody: Don't allow collision shape to be animated
While it's fun to be able to change collison shape while the simulation is running it can cause crashes in some cases.
Diffstat (limited to 'source/blender/makesrna/intern/rna_rigidbody.c')
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index 938ef7a5032..71ff7bfd6ec 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -188,25 +188,6 @@ static void rna_RigidBodyOb_disabled_set(PointerRNA *ptr, int value)
#endif
}
-static void rna_RigidBodyOb_shape_set(PointerRNA *ptr, int value)
-{
- RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
- Object *ob = (Object *)ptr->id.data;
-
- rbo->shape = value;
-
- /* force creation of new collision shape reflecting this */
- BKE_rigidbody_validate_sim_shape(ob, TRUE);
-
-#ifdef WITH_BULLET
- /* now tell RB sim about it */
- if (rbo->physics_object && rbo->physics_shape) {
- RB_body_set_collision_shape(rbo->physics_object, rbo->physics_shape);
- }
-#endif
-}
-
-
static void rna_RigidBodyOb_mass_set(PointerRNA *ptr, float value)
{
RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
@@ -642,8 +623,8 @@ static void rna_def_rigidbody_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "collision_shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shape");
RNA_def_property_enum_items(prop, rigidbody_ob_shape_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_RigidBodyOb_shape_set", NULL);
RNA_def_property_ui_text(prop, "Collision Shape", "Collision Shape of object in Rigid Body Simulations");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset");
prop = RNA_def_property(srna, "kinematic", PROP_BOOLEAN, PROP_NONE);