Commit: 2a41ea7cc5c14a158c9fd7bd5570381bb3993f2d
Author: Valentin
Date:   Sat Jan 26 13:31:07 2019 +0100
Branches: master
https://developer.blender.org/rB2a41ea7cc5c14a158c9fd7bd5570381bb3993f2d

Fix: Use correct units for cloth properties

Differential Revision: https://developer.blender.org/D4260

===================================================================

M       source/blender/makesrna/intern/rna_cloth.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_cloth.c 
b/source/blender/makesrna/intern/rna_cloth.c
index a2b6d188742..cfd41f12620 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -506,7 +506,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
 
        /* mass */
 
-       prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
+       prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_UNIT_MASS);
        RNA_def_property_range(prop, 0.0f, 10.0f);
        RNA_def_property_ui_text(prop, "Mass", "Mass of cloth material");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
@@ -772,7 +772,7 @@ static void rna_def_cloth_collision_settings(BlenderRNA 
*brna)
        RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions 
with other objects");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
-       prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
+       prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, 
PROP_DISTANCE);
        RNA_def_property_float_sdna(prop, NULL, "epsilon");
        RNA_def_property_range(prop, 0.001f, 1.0f);
        RNA_def_property_ui_text(prop, "Minimum Distance",
@@ -812,7 +812,7 @@ static void rna_def_cloth_collision_settings(BlenderRNA 
*brna)
        RNA_def_property_ui_text(prop, "Enable Self Collision", "Enable self 
collisions");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
 
-       prop = RNA_def_property(srna, "self_distance_min", PROP_FLOAT, 
PROP_NONE);
+       prop = RNA_def_property(srna, "self_distance_min", PROP_FLOAT, 
PROP_DISTANCE);
        RNA_def_property_float_sdna(prop, NULL, "selfepsilon");
        RNA_def_property_range(prop, 0.001f, 0.1f);
        RNA_def_property_ui_text(prop, "Self Minimum Distance", "Minimum 
distance between cloth faces before collision response takes effect");

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to