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:
authorSebastian Parborg <darkdefende@gmail.com>2020-09-02 15:14:47 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-09-02 15:20:41 +0300
commit1aa54d4921c2e8d7114f463a940c169ee573f557 (patch)
tree902f7f8c82fbeb16acb5d569fafc8423e58dd7a9 /source/blender/makesrna/intern/rna_rigidbody.c
parentfeb4b645d70ec8ad5c3f91a957738a9fba4054f0 (diff)
Make rigidbody simulation handle animated objects gracefully
The animated objects was not updated for each internal substep for the rigidbody sim. This would lead to unstable simulations or very annoying clipping artifacts. Updated the code to use explicit substeps and tie it to the scene frame rate. Fix T47402: Properly updating the animated objects fixes the reported issue. Reviewed By: Brecht, Jacques Differential Revision: http://developer.blender.org/D8762
Diffstat (limited to 'source/blender/makesrna/intern/rna_rigidbody.c')
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index fb550b38b31..6c8b8e6859d 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -906,15 +906,15 @@ static void rna_def_rigidbody_world(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset");
/* timestep */
- prop = RNA_def_property(srna, "steps_per_second", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "steps_per_second");
+ prop = RNA_def_property(srna, "substeps_per_frame", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "substeps_per_frame");
RNA_def_property_range(prop, 1, SHRT_MAX);
- RNA_def_property_ui_range(prop, 60, 1000, 1, -1);
- RNA_def_property_int_default(prop, 60);
+ RNA_def_property_ui_range(prop, 1, 1000, 1, -1);
+ RNA_def_property_int_default(prop, 10);
RNA_def_property_ui_text(
prop,
- "Steps Per Second",
- "Number of simulation steps taken per second (higher values are more accurate "
+ "Substeps Per Frame",
+ "Number of simulation steps taken per frame (higher values are more accurate "
"but slower)");
RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset");