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:
authorMartin Felke <martin.felke@googlemail.com>2018-12-02 23:30:39 +0300
committerMartin Felke <martin.felke@googlemail.com>2018-12-02 23:30:39 +0300
commit8b322524c9eb7c7d6f2026d0878bfe056f88aed7 (patch)
treed03a92688b856d1d5e33e8c0f3b99dc8e5f24558
parent5183a1d0ed723cd00ae7946ac156c32e6ba45775 (diff)
small fix for minimum mass and UI float display precision changes
testing now against being smaller than minimum mass 0.001 and setting it to 0.001 instead of testing against 0 (useless with float) adapted displayed UI precision with breaking threshold, cluster breaking threshold, breaking distance and cluster breaking distance.
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c2
-rw-r--r--source/blender/makesrna/intern/rna_fracture.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 096a56adc30..889a3653174 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -2989,7 +2989,7 @@ void BKE_rigidbody_calc_shard_mass(Object *ob, MeshIsland *mi, DerivedMesh *orig
}
if (mi->rigidbody->type == RBO_TYPE_ACTIVE) {
- if (mi->rigidbody->mass == 0)
+ if (mi->rigidbody->mass < 0.001)
mi->rigidbody->mass = 0.001; /* set a minimum mass for active objects */
}
diff --git a/source/blender/makesrna/intern/rna_fracture.c b/source/blender/makesrna/intern/rna_fracture.c
index 17fdb7e1040..0d9cf72f804 100644
--- a/source/blender/makesrna/intern/rna_fracture.c
+++ b/source/blender/makesrna/intern/rna_fracture.c
@@ -824,7 +824,7 @@ void RNA_def_fracture(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_float_funcs(prop, NULL, "rna_FractureModifier_threshold_set", NULL);
RNA_def_property_ui_text(prop, "Inner Breaking threshold", "Threshold to break constraints between shards in the same object");
- RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 0.0001f, 5);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 0.1f, 5);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -880,7 +880,7 @@ void RNA_def_fracture(BlenderRNA *brna)
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_float_funcs(prop, NULL, "rna_FractureModifier_breaking_distance_set", NULL);
RNA_def_property_ui_text(prop, "Breaking Distance", "Distance above which constraint should break");
- RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 0.1f, 2);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 0.1, 4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -894,7 +894,7 @@ void RNA_def_fracture(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_float_funcs(prop, NULL, "rna_FractureModifier_cluster_threshold_set", NULL);
RNA_def_property_ui_text(prop, "Cluster Breaking threshold", "Threshold to break constraints INSIDE a cluster of shards");
- RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 0.01f, 5);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1.0, 5);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1116,7 +1116,7 @@ void RNA_def_fracture(BlenderRNA *brna)
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_float_funcs(prop, NULL, "rna_FractureModifier_cluster_breaking_distance_set", NULL);
RNA_def_property_ui_text(prop, "Cluster Breaking Distance", "Distance above which constraint between different clusters should break");
- RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 0.1f, 2);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 0.1, 4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update");