diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-03-31 12:08:16 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-04-09 19:14:35 +0300 |
commit | 26a283deae7a3b78a197d4bcf4bfd288c598aedc (patch) | |
tree | e6c38423101f5c63b8476a96e26b3be391fedd58 /source/blender/makesrna | |
parent | 7e39d151d850590fbabc9870bc5134d9421c5c2c (diff) |
Use the newer version of the bullet 6dof spring constraint for rigidbody.
The new constraint is slower and not backward compatible, but should
be better, especially in the damping side. The new constraint also
has a different valid range of the damping coefficient, and a limit
implementation that bounces instead of making the object stationary.
Reviewers: sergof
Differential Revision: https://developer.blender.org/D3125
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_rigidbody.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index 188200eaff9..4c3301d5f9e 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -1293,49 +1293,49 @@ static void rna_def_rigidbody_constraint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Z Angle Stiffness", "Stiffness on the Z rotational axis"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); - prop = RNA_def_property(srna, "spring_damping_x", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "spring_damping_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spring_damping_x"); - RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_float_default(prop, 0.5f); RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyCon_spring_damping_x_set", NULL); RNA_def_property_ui_text(prop, "Damping X", "Damping on the X axis"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); - prop = RNA_def_property(srna, "spring_damping_y", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "spring_damping_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spring_damping_y"); - RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_float_default(prop, 0.5f); RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyCon_spring_damping_y_set", NULL); RNA_def_property_ui_text(prop, "Damping Y", "Damping on the Y axis"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); - prop = RNA_def_property(srna, "spring_damping_z", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "spring_damping_z", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spring_damping_z"); - RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_float_default(prop, 0.5f); RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyCon_spring_damping_z_set", NULL); RNA_def_property_ui_text(prop, "Damping Z", "Damping on the Z axis"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); - prop = RNA_def_property(srna, "spring_damping_ang_x", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "spring_damping_ang_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spring_damping_ang_x"); - RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_float_default(prop, 0.5f); RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyCon_spring_damping_ang_x_set", NULL); RNA_def_property_ui_text(prop, "Damping X Angle", "Damping on the X rotational axis"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); - prop = RNA_def_property(srna, "spring_damping_ang_y", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "spring_damping_ang_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spring_damping_ang_y"); - RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_float_default(prop, 0.5f); RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyCon_spring_damping_ang_y_set", NULL); RNA_def_property_ui_text(prop, "Damping Y Angle", "Damping on the Y rotational axis"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); - prop = RNA_def_property(srna, "spring_damping_ang_z", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "spring_damping_ang_z", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spring_damping_ang_z"); - RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_float_default(prop, 0.5f); RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyCon_spring_damping_ang_z_set", NULL); RNA_def_property_ui_text(prop, "Damping Z Angle", "Damping on the Z rotational axis"); |