[Bf-blender-cvs] [69d4aec55f9] master: Cleanup: Use the SCULPT_ prefix in all sculpt_intern functions

Pablo Dobarro noreply at git.blender.org
Fri Mar 6 15:24:51 CET 2020


Commit: 69d4aec55f9c5bc64c58e43edefc6687fcb9d08b
Author: Pablo Dobarro
Date:   Fri Mar 6 15:24:15 2020 +0100
Branches: master
https://developer.blender.org/rB69d4aec55f9c5bc64c58e43edefc6687fcb9d08b

Cleanup: Use the SCULPT_ prefix in all sculpt_intern functions

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

M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/sculpt_paint/paint_hide.c
M	source/blender/editors/sculpt_paint/paint_mask.c
M	source/blender/editors/sculpt_paint/paint_ops.c
M	source/blender/editors/sculpt_paint/paint_stroke.c
M	source/blender/editors/sculpt_paint/paint_vertex.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_cloth.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h
M	source/blender/editors/sculpt_paint/sculpt_pose.c
M	source/blender/editors/sculpt_paint/sculpt_undo.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 7198fb7df11..963fc556827 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -580,7 +580,7 @@ static bool sculpt_get_brush_geometry(bContext *C,
 
   if (vc->obact->sculpt && vc->obact->sculpt->pbvh) {
     if (!ups->stroke_active) {
-      hit = sculpt_stroke_get_location(C, location, mouse);
+      hit = SCULPT_stroke_get_location(C, location, mouse);
     }
     else {
       hit = ups->last_hit;
@@ -1212,7 +1212,7 @@ static void sculpt_geometry_preview_lines_draw(const uint gpuattr, SculptSession
   if (ss->preview_vert_index_count > 0) {
     immBegin(GPU_PRIM_LINES, ss->preview_vert_index_count);
     for (int i = 0; i < ss->preview_vert_index_count; i++) {
-      immVertex3fv(gpuattr, sculpt_vertex_co_get(ss, ss->preview_vert_index_list[i]));
+      immVertex3fv(gpuattr, SCULPT_vertex_co_get(ss, ss->preview_vert_index_list[i]));
     }
     immEnd();
   }
@@ -1439,7 +1439,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
     /* Update the active vertex. */
     if ((mode == PAINT_MODE_SCULPT) && ss && !ups->stroke_active) {
       prev_active_vertex_index = ss->active_vertex_index;
-      is_cursor_over_mesh = sculpt_cursor_geometry_info_update(
+      is_cursor_over_mesh = SCULPT_cursor_geometry_info_update(
           C, &gi, mouse, (brush->falloff_shape == PAINT_FALLOFF_SHAPE_SPHERE));
     }
     /* Use special paint crosshair cursor in all paint modes. */
@@ -1551,7 +1551,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
           if (brush->sculpt_tool == SCULPT_TOOL_GRAB && (brush->flag & BRUSH_GRAB_ACTIVE_VERTEX) &&
               !is_multires) {
             if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && ss->deform_modifiers_active) {
-              sculpt_geometry_preview_lines_update(C, ss, rds);
+              SCULPT_geometry_preview_lines_update(C, ss, rds);
               sculpt_geometry_preview_lines_draw(pos, ss);
             }
           }
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c
index aed9e47b972..fe091dee4f8 100644
--- a/source/blender/editors/sculpt_paint/paint_hide.c
+++ b/source/blender/editors/sculpt_paint/paint_hide.c
@@ -97,7 +97,7 @@ static void partialvis_update_mesh(Object *ob,
   BKE_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert);
   paint_mask = CustomData_get_layer(&me->vdata, CD_PAINT_MASK);
 
-  sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
+  SCULPT_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
 
   for (i = 0; i < totvert; i++) {
     MVert *v = &mvert[vert_indices[i]];
@@ -145,7 +145,7 @@ static void partialvis_update_grids(Depsgraph *depsgraph,
   grid_hidden = BKE_pbvh_grid_hidden(pbvh);
   CCGKey key = *BKE_pbvh_get_grid_key(pbvh);
 
-  sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
+  SCULPT_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
 
   for (int i = 0; i < totgrid; i++) {
     int any_hidden = 0;
@@ -274,7 +274,7 @@ static void partialvis_update_bmesh(Object *ob,
   other = BKE_pbvh_bmesh_node_other_verts(node);
   faces = BKE_pbvh_bmesh_node_faces(node);
 
-  sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
+  SCULPT_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
 
   partialvis_update_bmesh_verts(bm, unique, action, area, planes, &any_changed, &any_visible);
 
@@ -369,10 +369,10 @@ static int hide_show_exec(bContext *C, wmOperator *op)
   /* Start undo. */
   switch (action) {
     case PARTIALVIS_HIDE:
-      sculpt_undo_push_begin("Hide area");
+      SCULPT_undo_push_begin("Hide area");
       break;
     case PARTIALVIS_SHOW:
-      sculpt_undo_push_begin("Show area");
+      SCULPT_undo_push_begin("Show area");
       break;
   }
 
@@ -395,7 +395,7 @@ static int hide_show_exec(bContext *C, wmOperator *op)
   }
 
   /* End undo. */
-  sculpt_undo_push_end();
+  SCULPT_undo_push_end();
 
   /* Ensure that edges and faces get hidden as well (not used by
    * sculpt but it looks wrong when entering editmode otherwise). */
@@ -450,7 +450,7 @@ void PAINT_OT_hide_show(struct wmOperatorType *ot)
   ot->modal = WM_gesture_box_modal;
   ot->exec = hide_show_exec;
   /* Sculpt-only for now. */
-  ot->poll = sculpt_mode_poll_view3d;
+  ot->poll = SCULPT_mode_poll_view3d;
 
   ot->flag = OPTYPE_REGISTER;
 
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 893210d96da..c8f4bdc0522 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -115,7 +115,7 @@ static void mask_flood_fill_task_cb(void *__restrict userdata,
 
   PBVHVertexIter vi;
 
-  sculpt_undo_push_node(data->ob, node, SCULPT_UNDO_MASK);
+  SCULPT_undo_push_node(data->ob, node, SCULPT_UNDO_MASK);
 
   BKE_pbvh_vertex_iter_begin(data->pbvh, node, vi, PBVH_ITER_UNIQUE)
   {
@@ -157,7 +157,7 @@ static int mask_flood_fill_exec(bContext *C, wmOperator *op)
 
   BKE_pbvh_search_gather(pbvh, NULL, NULL, &nodes, &totnode);
 
-  sculpt_undo_push_begin("Mask flood fill");
+  SCULPT_undo_push_begin("Mask flood fill");
 
   MaskTaskData data = {
       .ob = ob,
@@ -178,7 +178,7 @@ static int mask_flood_fill_exec(bContext *C, wmOperator *op)
 
   BKE_pbvh_update_vertex_data(pbvh, PBVH_UpdateMask);
 
-  sculpt_undo_push_end();
+  SCULPT_undo_push_end();
 
   if (nodes) {
     MEM_freeN(nodes);
@@ -200,7 +200,7 @@ void PAINT_OT_mask_flood_fill(struct wmOperatorType *ot)
 
   /* API callbacks. */
   ot->exec = mask_flood_fill_exec;
-  ot->poll = sculpt_mode_poll;
+  ot->poll = SCULPT_mode_poll;
 
   ot->flag = OPTYPE_REGISTER;
 
@@ -272,7 +272,7 @@ static void mask_box_select_task_cb(void *__restrict userdata,
       if (!any_masked) {
         any_masked = true;
 
-        sculpt_undo_push_node(data->ob, node, SCULPT_UNDO_MASK);
+        SCULPT_undo_push_node(data->ob, node, SCULPT_UNDO_MASK);
 
         if (data->multires) {
           BKE_pbvh_node_mark_normals_update(node);
@@ -317,7 +317,7 @@ bool ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *
   pbvh = ob->sculpt->pbvh;
   multires = (BKE_pbvh_type(pbvh) == PBVH_GRIDS);
 
-  sculpt_undo_push_begin("Mask box fill");
+  SCULPT_undo_push_begin("Mask box fill");
 
   for (int symmpass = 0; symmpass <= symm; symmpass++) {
     if (symmpass == 0 || (symm & symmpass && (symm != 5 || symmpass != 3) &&
@@ -359,7 +359,7 @@ bool ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *
 
   BKE_pbvh_update_vertex_data(pbvh, PBVH_UpdateMask);
 
-  sculpt_undo_push_end();
+  SCULPT_undo_push_end();
 
   ED_region_tag_redraw(ar);
 
@@ -440,7 +440,7 @@ static void mask_gesture_lasso_task_cb(void *__restrict userdata,
       if (!any_masked) {
         any_masked = true;
 
-        sculpt_undo_push_node(data->ob, node, SCULPT_UNDO_MASK);
+        SCULPT_undo_push_node(data->ob, node, SCULPT_UNDO_MASK);
 
         BKE_pbvh_node_mark_redraw(node);
         if (data->multires) {
@@ -504,7 +504,7 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op)
     pbvh = ob->sculpt->pbvh;
     multires = (BKE_pbvh_type(pbvh) == PBVH_GRIDS);
 
-    sculpt_undo_push_begin("Mask lasso fill");
+    SCULPT_undo_push_begin("Mask lasso fill");
 
     for (int symmpass = 0; symmpass <= symm; symmpass++) {
       if ((symmpass == 0) || (symm & symmpass && (symm != 5 || symmpass != 3) &&
@@ -548,7 +548,7 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op)
 
     BKE_pbvh_update_vertex_data(pbvh, PBVH_UpdateMask);
 
-    sculpt_undo_push_end();
+    SCULPT_undo_push_end();
 
     ED_region_tag_redraw(vc.ar);
     MEM_freeN((void *)mcords);
@@ -571,7 +571,7 @@ void PAINT_OT_mask_lasso_gesture(wmOperatorType *ot)
   ot->modal = WM_gesture_lasso_modal;
   ot->exec = paint_mask_gesture_lasso_exec;
 
-  ot->poll = sculpt_mode_poll;
+  ot->poll = SCULPT_mode_poll;
 
   ot->flag = OPTYPE_REGISTER;
 
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 5d73eb4a6a2..6ed0bf1b7ba 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -1050,7 +1050,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
 
   /* Sculpt mode */
   keymap = WM_keymap_ensure(keyconf, "Sculpt", 0, 0);
-  keymap->poll = sculpt_mode_poll;
+  keymap->poll = SCULPT_mode_poll;
 
   /* Vertex Paint mode */
   keymap = WM_keymap_ensure(keyconf, "Vertex Paint", 0, 0);
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 2fb89a49016..90341fa8248 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -560,7 +560,7 @@ static void paint_brush_stroke_add_step(bContext *C,
   stroke->last_pressure = pressure;
 
   if (paint_stroke_use_scene_spacing(brush, mode)) {
-    sculpt_stroke_get_location(C, stroke->last_world_space_position, stroke->last_mouse_position);
+    SCULPT_stroke_get_location(C, stroke->last_world_space_position, stroke->last_mouse_position);
     mul_m4_v3(stroke->vc.obact->obmat, stroke->last_world_space_position);
   }
 
@@ -817,7 +817,7 @@ static int paint_space_stroke(bContext *C,
 
   if (use_scene_spacing) {
     float world_space_position[3];
-    bool hit = sculpt_stroke_get_location(C, world_space_position, final_mouse);
+    bool hit = SCULPT_stroke_get_location(C, world_space_position, final_mouse);
     mul_m4_v3(stroke->vc.obact->obmat, world_space_position);
     if (hit && stroke->stroke_over_mesh) {
       sub_v3_v3v3(d_world_space_position, world_space_position, stroke->last_world_space_position);
@@ -1403,7 +1403,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
     stroke->last_pressure = sample_average.pressure;
     copy_v2_v2(stroke->last_mouse_position, sample_average.mouse);
     if (paint_stroke_use_scene_spacing(br, mode)) {
-      stroke->stroke_over_mesh = sculpt_stroke_get_location(
+  

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list