From 8b322524c9eb7c7d6f2026d0878bfe056f88aed7 Mon Sep 17 00:00:00 2001 From: Martin Felke Date: Sun, 2 Dec 2018 21:30:39 +0100 Subject: 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. --- source/blender/blenkernel/intern/rigidbody.c | 2 +- source/blender/makesrna/intern/rna_fracture.c | 8 ++++---- 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"); -- cgit v1.2.3