[Bf-blender-cvs] [8b322524c9e] fracture_modifier: small fix for minimum mass and UI float display precision changes
Martin Felke
noreply at git.blender.org
Sun Dec 2 22:16:56 CET 2018
Commit: 8b322524c9eb7c7d6f2026d0878bfe056f88aed7
Author: Martin Felke
Date: Sun Dec 2 21:30:39 2018 +0100
Branches: fracture_modifier
https://developer.blender.org/rB8b322524c9eb7c7d6f2026d0878bfe056f88aed7
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.
===================================================================
M source/blender/blenkernel/intern/rigidbody.c
M source/blender/makesrna/intern/rna_fracture.c
===================================================================
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");
More information about the Bf-blender-cvs
mailing list