diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-01-23 09:56:34 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-01-23 09:56:34 +0400 |
commit | 089cf12435dfbc4b934a73b73ecd617b27ac678d (patch) | |
tree | e2c8b7b187694ca7ae4640b76634ddcba5644600 /source/blender/makesrna | |
parent | fc377c17e3d4803ef4db7a72daae629a322ffde8 (diff) |
rigidbody: Add point cache support
Add read/write/interpolate functions.
In order to get rigid body point cache id from object it's now required to pass the
scene to BKE_ptcache_ids_from_object().
Rigid body cache is drawn in the orange color of the bullet logo.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_rigidbody.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index cd8b63cd0de..1e0e250ac66 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -346,6 +346,12 @@ static void rna_def_rigidbody_world(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Split Impulse", "Reduces extra velocity that can build up when objects collide (lowers simulation stabilty a litte so use only when necessary)"); RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset"); + /* cache */ + prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "pointcache"); + RNA_def_property_ui_text(prop, "Point Cache", ""); + /* effector weights */ prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "EffectorWeights"); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 5d009a627e6..f7e9899421e 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2760,6 +2760,11 @@ static void rna_def_space_time(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DYNAMICPAINT); RNA_def_property_ui_text(prop, "Dynamic Paint", "Show the active object's Dynamic Paint cache"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); + + prop = RNA_def_property(srna, "cache_rigidbody", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_RIGIDBODY); + RNA_def_property_ui_text(prop, "Rigid Body", "Show the active object's Rigid Body cache"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); } static void rna_def_console_line(BlenderRNA *brna) |