[Bf-blender-cvs] [0a9bc6944c0] sculpt-dev: Rename random per component to random per loose part

Pablo Dobarro noreply at git.blender.org
Fri Feb 5 21:59:38 CET 2021


Commit: 0a9bc6944c072f9afb3378f824812085ad8d06d3
Author: Pablo Dobarro
Date:   Fri Feb 5 20:33:38 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB0a9bc6944c072f9afb3378f824812085ad8d06d3

Rename random per component to random per loose part

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

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 9c4b799b427..b26a3b3965c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3242,8 +3242,8 @@ class VIEW3D_MT_random_mask(Menu):
         op = layout.operator("sculpt.mask_init", text='Per Face Set')
         op.mode = 'RANDOM_PER_FACE_SET'
 
-        op = layout.operator("sculpt.mask_init", text='Per Component')
-        op.mode = 'RANDOM_PER_COMPONENT'
+        op = layout.operator("sculpt.mask_init", text='Per Loose Part')
+        op.mode = 'RANDOM_PER_LOOSE_PART'
 
 class VIEW3D_MT_particle(Menu):
     bl_label = "Particle"
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index b4f412bdac4..2d4b53bcabd 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -10193,7 +10193,7 @@ static void SCULPT_OT_dyntopo_detail_size_edit(wmOperatorType *ot)
 typedef enum eSculptMaskInitMode {
   SCULPT_MASK_INIT_RANDOM_PER_VERTEX,
   SCULPT_MASK_INIT_RANDOM_PER_FACE_SET,
-  SCULPT_MASK_INIT_RANDOM_PER_COMPONENT,
+  SCULPT_MASK_INIT_RANDOM_PER_LOOSE_PART,
 } eSculptMaskInitMode;
 
 static EnumPropertyItem prop_sculpt_mask_init_mode_types[] = {
@@ -10212,10 +10212,10 @@ static EnumPropertyItem prop_sculpt_mask_init_mode_types[] = {
         "",
     },
     {
-        SCULPT_MASK_INIT_RANDOM_PER_COMPONENT,
-        "RANDOM_PER_COMPONENT",
+        SCULPT_MASK_INIT_RANDOM_PER_LOOSE_PART,
+        "RANDOM_PER_LOOSE_PART",
         0,
-        "Random per Component",
+        "Random per Loose Part",
         "",
     },
     {0, NULL, 0, NULL, NULL},
@@ -10244,7 +10244,7 @@ static void mask_init_task_cb(void *__restrict userdata,
         *vd.mask = BLI_hash_int_01(face_set + seed);
         break;
       }
-      case SCULPT_MASK_INIT_RANDOM_PER_COMPONENT:
+      case SCULPT_MASK_INIT_RANDOM_PER_LOOSE_PART:
         *vd.mask = BLI_hash_int_01(ss->vertex_info.connected_component[vd.index] + seed);
         break;
     }
@@ -10274,7 +10274,7 @@ static int sculpt_mask_init_exec(bContext *C, wmOperator *op)
 
   SCULPT_undo_push_begin(ob, "init mask");
 
-  if (mode == SCULPT_MASK_INIT_RANDOM_PER_COMPONENT) {
+  if (mode == SCULPT_MASK_INIT_RANDOM_PER_LOOSE_PART) {
     SCULPT_connected_components_ensure(ob);
   }



More information about the Bf-blender-cvs mailing list