[Bf-blender-cvs] [85ddba475ba] master: Cleanup: no need for plural for term 'collision'

Campbell Barton noreply at git.blender.org
Thu Aug 6 01:50:54 CEST 2020


Commit: 85ddba475baec0737367069a019e0d2a98dacbd7
Author: Campbell Barton
Date:   Thu Aug 6 09:38:25 2020 +1000
Branches: master
https://developer.blender.org/rB85ddba475baec0737367069a019e0d2a98dacbd7

Cleanup: no need for plural for term 'collision'

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

M	release/scripts/startup/bl_ui/properties_paint_common.py
M	source/blender/editors/sculpt_paint/sculpt_cloth.c
M	source/blender/makesdna/DNA_brush_types.h
M	source/blender/makesrna/intern/rna_brush.c

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

diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 8afd47f5da6..ee62a1115e3 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -667,7 +667,7 @@ def brush_settings(layout, context, brush, popover=False):
             layout.prop(brush, "cloth_damping")
             layout.prop(brush, "cloth_constraint_softbody_strength")
             layout.separator()
-            layout.prop(brush, "use_cloth_collisions")
+            layout.prop(brush, "use_cloth_collision")
             layout.separator()
 
         elif sculpt_tool == 'SCRAPE':
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c
index c6feef0808c..cfcd34ce3a5 100644
--- a/source/blender/editors/sculpt_paint/sculpt_cloth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c
@@ -907,7 +907,11 @@ void SCULPT_do_cloth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
     if (SCULPT_stroke_is_first_brush_step(ss->cache) || !ss->cache->cloth_sim) {
       const bool is_cloth_deform_brush = SCULPT_is_cloth_deform_brush(brush);
       ss->cache->cloth_sim = cloth_brush_simulation_create(
-          ss, brush, brush->cloth_mass, brush->cloth_damping, brush->flag2 & BRUSH_CLOTH_USE_COLLISIONS);
+          ss,
+          brush,
+          brush->cloth_mass,
+          brush->cloth_damping,
+          (brush->flag2 & BRUSH_CLOTH_USE_COLLISION));
       for (int i = 0; i < totverts; i++) {
         copy_v3_v3(ss->cache->cloth_sim->last_iteration_pos[i], SCULPT_vertex_co_get(ss, i));
         copy_v3_v3(ss->cache->cloth_sim->init_pos[i], SCULPT_vertex_co_get(ss, i));
@@ -1182,7 +1186,8 @@ static int sculpt_cloth_filter_invoke(bContext *C, wmOperator *op, const wmEvent
   const float cloth_mass = RNA_float_get(op->ptr, "cloth_mass");
   const float cloth_damping = RNA_float_get(op->ptr, "cloth_damping");
   const bool use_collisions = RNA_boolean_get(op->ptr, "use_collisions");
-  ss->filter_cache->cloth_sim = cloth_brush_simulation_create(ss, NULL, cloth_mass, cloth_damping, use_collisions);
+  ss->filter_cache->cloth_sim = cloth_brush_simulation_create(
+      ss, NULL, cloth_mass, cloth_damping, use_collisions);
 
   copy_v3_v3(ss->filter_cache->cloth_sim_pinch_point, SCULPT_active_vertex_co_get(ss));
 
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 72f205685b9..7b3e9dabe9f 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -740,7 +740,7 @@ typedef enum eBrushFlags2 {
   BRUSH_USE_CONNECTED_ONLY = (1 << 3),
   BRUSH_CLOTH_PIN_SIMULATION_BOUNDARY = (1 << 4),
   BRUSH_POSE_USE_LOCK_ROTATION = (1 << 5),
-  BRUSH_CLOTH_USE_COLLISIONS = (1 << 6),
+  BRUSH_CLOTH_USE_COLLISION = (1 << 6),
 } eBrushFlags2;
 
 typedef enum {
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index ccd2919ab98..d20cec518bc 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -2824,10 +2824,9 @@ static void rna_def_brush(BlenderRNA *brna)
       "create a softer transitionwith with unnafected areas");
   RNA_def_property_update(prop, 0, "rna_Brush_update");
 
-  prop = RNA_def_property(srna, "use_cloth_collisions", PROP_BOOLEAN, PROP_NONE);
-  RNA_def_property_boolean_sdna(prop, NULL, "flag2", BRUSH_CLOTH_USE_COLLISIONS);
-  RNA_def_property_ui_text(
-      prop, "Enable Collisions", "Collide with objects during the simulation");
+  prop = RNA_def_property(srna, "use_cloth_collision", PROP_BOOLEAN, PROP_NONE);
+  RNA_def_property_boolean_sdna(prop, NULL, "flag2", BRUSH_CLOTH_USE_COLLISION);
+  RNA_def_property_ui_text(prop, "Enable Collision", "Collide with objects during the simulation");
   RNA_def_property_update(prop, 0, "rna_Brush_update");
 
   prop = RNA_def_property(srna, "invert_to_scrape_fill", PROP_BOOLEAN, PROP_NONE);



More information about the Bf-blender-cvs mailing list