From 3adcc1378cd6bd784599e7ecfdd0fad06e7e0d3e Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 30 Nov 2023 10:35:13 -0500 Subject: [PATCH] Cleanup: Avoid using keyword in sculpt header This approach doesn't scale well, and the right solution is to move this code to the proper namespace anyway. --- .../editors/sculpt_paint/sculpt_boundary.cc | 2 +- .../editors/sculpt_paint/sculpt_cloth.cc | 1 + .../editors/sculpt_paint/sculpt_detail.cc | 2 +- .../editors/sculpt_paint/sculpt_expand.cc | 5 +- .../editors/sculpt_paint/sculpt_face_set.cc | 4 +- .../sculpt_paint/sculpt_filter_mask.cc | 2 +- .../sculpt_paint/sculpt_filter_mesh.cc | 2 +- .../editors/sculpt_paint/sculpt_intern.hh | 124 ++++++++++-------- .../sculpt_paint/sculpt_multiplane_scrape.cc | 2 +- .../editors/sculpt_paint/sculpt_ops.cc | 2 +- .../sculpt_paint/sculpt_paint_color.cc | 6 +- .../sculpt_paint/sculpt_paint_image.cc | 2 +- .../editors/sculpt_paint/sculpt_pose.cc | 2 +- .../editors/sculpt_paint/sculpt_smooth.cc | 13 +- .../editors/sculpt_paint/sculpt_transform.cc | 2 +- .../editors/sculpt_paint/sculpt_undo.cc | 3 + 16 files changed, 100 insertions(+), 74 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.cc b/source/blender/editors/sculpt_paint/sculpt_boundary.cc index eb47ae3469f..ef904127713 100644 --- a/source/blender/editors/sculpt_paint/sculpt_boundary.cc +++ b/source/blender/editors/sculpt_paint/sculpt_boundary.cc @@ -947,7 +947,7 @@ static void do_boundary_brush_smooth_task(Object *ob, const Brush *brush, PBVHNo BKE_pbvh_vertex_iter_end; } -void SCULPT_do_boundary_brush(Sculpt *sd, Object *ob, Span nodes) +void SCULPT_do_boundary_brush(Sculpt *sd, Object *ob, blender::Span nodes) { using namespace blender; SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.cc b/source/blender/editors/sculpt_paint/sculpt_cloth.cc index 6a689952c5f..fd4c2a7c493 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.cc +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.cc @@ -55,6 +55,7 @@ #include #include +using blender::Span; using blender::Vector; static void cloth_brush_simulation_location_get(SculptSession *ss, diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.cc b/source/blender/editors/sculpt_paint/sculpt_detail.cc index 047d29459db..f3daa2b3bfb 100644 --- a/source/blender/editors/sculpt_paint/sculpt_detail.cc +++ b/source/blender/editors/sculpt_paint/sculpt_detail.cc @@ -91,7 +91,7 @@ static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *op) float size; float bb_min[3], bb_max[3], center[3], dim[3]; - Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); + blender::Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); if (nodes.is_empty()) { return OPERATOR_CANCELLED; diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.cc b/source/blender/editors/sculpt_paint/sculpt_expand.cc index b3d9b417117..0459e57f164 100644 --- a/source/blender/editors/sculpt_paint/sculpt_expand.cc +++ b/source/blender/editors/sculpt_paint/sculpt_expand.cc @@ -53,6 +53,9 @@ #include "bmesh.h" +using blender::Span; +using blender::Vector; + /* Sculpt Expand. */ /* Operator for creating selections and patterns in Sculpt Mode. Expand can create masks, face sets * and fill vertex colors. */ @@ -2112,7 +2115,7 @@ static void sculpt_expand_cache_initial_config_set(bContext *C, static void sculpt_expand_undo_push(Object *ob, ExpandCache *expand_cache) { SculptSession *ss = ob->sculpt; - Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); + blender::Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); switch (expand_cache->target) { case SCULPT_EXPAND_TARGET_MASK: diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc index 2bd4538c77c..1da20ee94c7 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc @@ -391,7 +391,7 @@ static void do_relax_face_sets_brush_task(Object *ob, BKE_pbvh_vertex_iter_end; } -void SCULPT_do_draw_face_sets_brush(Sculpt *sd, Object *ob, Span nodes) +void SCULPT_do_draw_face_sets_brush(Sculpt *sd, Object *ob, blender::Span nodes) { using namespace blender; SculptSession *ss = ob->sculpt; @@ -1429,7 +1429,7 @@ static void sculpt_face_set_edit_modify_geometry(bContext *C, WM_event_add_notifier(C, NC_GEOM | ND_DATA, mesh); } -static void face_set_edit_do_post_visibility_updates(Object *ob, Span nodes) +static void face_set_edit_do_post_visibility_updates(Object *ob, blender::Span nodes) { SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mask.cc b/source/blender/editors/sculpt_paint/sculpt_filter_mask.cc index 1a720558e93..169482b0f74 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mask.cc +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mask.cc @@ -225,7 +225,7 @@ static int sculpt_mask_filter_exec(bContext *C, wmOperator *op) void SCULPT_mask_filter_smooth_apply(Sculpt * /*sd*/, Object *ob, - Span nodes, + blender::Span nodes, const int smooth_iterations) { using namespace blender; diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc index b16d7982b48..0a26f53a673 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc @@ -851,7 +851,7 @@ static void sculpt_mesh_filter_cancel(bContext *C, wmOperator * /*op*/) } /* Gather all PBVH leaf nodes. */ - Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); + blender::Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); for (PBVHNode *node : nodes) { PBVHVertexIter vd; diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.hh b/source/blender/editors/sculpt_paint/sculpt_intern.hh index 0e33c0cacf5..39537b87b8e 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.hh +++ b/source/blender/editors/sculpt_paint/sculpt_intern.hh @@ -58,9 +58,6 @@ struct wmKeyMap; struct wmOperator; struct wmOperatorType; -using blender::Span; -using blender::Vector; - /* Updates */ /* -------------------------------------------------------------------- */ @@ -362,7 +359,7 @@ struct FilterCache { float (*limit_surface_co)[3]; /* unmasked nodes */ - Vector nodes; + blender::Vector nodes; /* Cloth filter. */ SculptClothSimulation *cloth_sim; @@ -676,7 +673,7 @@ struct ExpandCache { /* Cached PBVH nodes. This allows to skip gathering all nodes from the PBVH each time expand * needs to update the state of the elements. */ - Vector nodes; + blender::Vector nodes; /* Expand state options. */ @@ -876,7 +873,9 @@ inline void SCULPT_mask_vert_set(const PBVHType type, break; } } -void SCULPT_mask_write_array(SculptSession *ss, Span nodes, Span mask); +void SCULPT_mask_write_array(SculptSession *ss, + blender::Span nodes, + blender::Span mask); /** Ensure random access; required for PBVH_BMESH */ void SCULPT_vertex_random_access_ensure(SculptSession *ss); @@ -1071,17 +1070,29 @@ BLI_INLINE bool SCULPT_tool_needs_all_pbvh_nodes(const Brush *brush) return false; } -void SCULPT_calc_brush_plane( - Sculpt *sd, Object *ob, Span nodes, float r_area_no[3], float r_area_co[3]); +void SCULPT_calc_brush_plane(Sculpt *sd, + Object *ob, + blender::Span nodes, + float r_area_no[3], + float r_area_co[3]); -void SCULPT_calc_area_normal(Sculpt *sd, Object *ob, Span nodes, float r_area_no[3]); +void SCULPT_calc_area_normal(Sculpt *sd, + Object *ob, + blender::Span nodes, + float r_area_no[3]); /** * This calculates flatten center and area normal together, * amortizing the memory bandwidth and loop overhead to calculate both at the same time. */ -void SCULPT_calc_area_normal_and_center( - Sculpt *sd, Object *ob, Span nodes, float r_area_no[3], float r_area_co[3]); -void SCULPT_calc_area_center(Sculpt *sd, Object *ob, Span nodes, float r_area_co[3]); +void SCULPT_calc_area_normal_and_center(Sculpt *sd, + Object *ob, + blender::Span nodes, + float r_area_no[3], + float r_area_co[3]); +void SCULPT_calc_area_center(Sculpt *sd, + Object *ob, + blender::Span nodes, + float r_area_co[3]); PBVHVertRef SCULPT_nearest_vertex_get( Sculpt *sd, Object *ob, const float co[3], float max_distance, bool use_original); @@ -1349,7 +1360,7 @@ void SCULPT_mesh_filter_properties(wmOperatorType *ot); void SCULPT_mask_filter_smooth_apply(Sculpt *sd, Object *ob, - Span nodes, + blender::Span nodes, int smooth_iterations); /* Filter orientation utils. */ @@ -1364,7 +1375,7 @@ void SCULPT_filter_zero_disabled_axis_components(float r_v[3], FilterCache *filt * \{ */ /* Main cloth brush function */ -void SCULPT_do_cloth_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_cloth_brush(Sculpt *sd, Object *ob, blender::Span nodes); void SCULPT_cloth_simulation_free(SculptClothSimulation *cloth_sim); @@ -1378,7 +1389,8 @@ SculptClothSimulation *SCULPT_cloth_brush_simulation_create(Object *ob, bool needs_deform_coords); void SCULPT_cloth_brush_simulation_init(SculptSession *ss, SculptClothSimulation *cloth_sim); -void SCULPT_cloth_sim_activate_nodes(SculptClothSimulation *cloth_sim, Span nodes); +void SCULPT_cloth_sim_activate_nodes(SculptClothSimulation *cloth_sim, + blender::Span nodes); void SCULPT_cloth_brush_store_simulation_state(SculptSession *ss, SculptClothSimulation *cloth_sim); @@ -1386,11 +1398,11 @@ void SCULPT_cloth_brush_store_simulation_state(SculptSession *ss, void SCULPT_cloth_brush_do_simulation_step(Sculpt *sd, Object *ob, SculptClothSimulation *cloth_sim, - Span nodes); + blender::Span nodes); void SCULPT_cloth_brush_ensure_nodes_constraints(Sculpt *sd, Object *ob, - Span nodes, + blender::Span nodes, SculptClothSimulation *cloth_sim, float initial_location[3], float radius); @@ -1411,7 +1423,8 @@ void SCULPT_cloth_plane_falloff_preview_draw(uint gpuattr, const float outline_col[3], float outline_alpha); -Vector SCULPT_cloth_brush_affected_nodes_gather(SculptSession *ss, Brush *brush); +blender::Vector SCULPT_cloth_brush_affected_nodes_gather(SculptSession *ss, + Brush *brush); BLI_INLINE bool SCULPT_is_cloth_deform_brush(const Brush *brush) { @@ -1447,8 +1460,8 @@ void SCULPT_neighbor_coords_average_interior(SculptSession *ss, PBVHVertRef vertex); void SCULPT_smooth( - Sculpt *sd, Object *ob, Span nodes, float bstrength, bool smooth_mask); -void SCULPT_do_smooth_brush(Sculpt *sd, Object *ob, Span nodes); + Sculpt *sd, Object *ob, blender::Span nodes, float bstrength, bool smooth_mask); +void SCULPT_do_smooth_brush(Sculpt *sd, Object *ob, blender::Span nodes); /* Surface Smooth Brush. */ @@ -1465,7 +1478,7 @@ void SCULPT_surface_smooth_displace_step(SculptSession *ss, PBVHVertRef vertex, float beta, float fade); -void SCULPT_do_surface_smooth_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_surface_smooth_brush(Sculpt *sd, Object *ob, blender::Span nodes); /* Slide/Relax */ void SCULPT_relax_vertex(SculptSession *ss, @@ -1481,7 +1494,7 @@ void SCULPT_relax_vertex(SculptSession *ss, */ bool SCULPT_pbvh_calc_area_normal(const Brush *brush, Object *ob, - Span nodes, + blender::Span nodes, float r_area_no[3]); /** @@ -1628,7 +1641,7 @@ void SCULPT_OT_dynamic_topology_toggle(wmOperatorType *ot); /** * Main Brush Function. */ -void SCULPT_do_pose_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_pose_brush(Sculpt *sd, Object *ob, blender::Span nodes); /** * Calculate the pose origin and (Optionally the pose factor) * that is used when using the pose brush. @@ -1665,7 +1678,7 @@ SculptBoundary *SCULPT_boundary_data_init(Object *object, float radius); void SCULPT_boundary_data_free(SculptBoundary *boundary); /* Main Brush Function. */ -void SCULPT_do_boundary_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_boundary_brush(Sculpt *sd, Object *ob, blender::Span nodes); void SCULPT_boundary_edges_preview_draw(uint gpuattr, SculptSession *ss, @@ -1675,21 +1688,21 @@ void SCULPT_boundary_pivot_line_preview_draw(uint gpuattr, SculptSession *ss); /* Multi-plane Scrape Brush. */ /* Main Brush Function. */ -void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, blender::Span nodes); void SCULPT_multiplane_scrape_preview_draw(uint gpuattr, Brush *brush, SculptSession *ss, const float outline_col[3], float outline_alpha); /* Draw Face Sets Brush. */ -void SCULPT_do_draw_face_sets_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_draw_face_sets_brush(Sculpt *sd, Object *ob, blender::Span nodes); /* Paint Brush. */ void SCULPT_do_paint_brush(PaintModeSettings *paint_mode_settings, Sculpt *sd, Object *ob, - Span nodes, - Span texnodes); + blender::Span nodes, + blender::Span texnodes); /** * \brief Get the image canvas for painting on the given object. @@ -1705,42 +1718,45 @@ bool SCULPT_paint_image_canvas_get(PaintModeSettings *paint_mode_settings, void SCULPT_do_paint_brush_image(PaintModeSettings *paint_mode_settings, Sculpt *sd, Object *ob, - Span texnodes); + blender::Span texnodes); bool SCULPT_use_image_paint_brush(PaintModeSettings *settings, Object *ob) ATTR_NONNULL(); /* Smear Brush. */ -void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, blender::Span nodes); float SCULPT_clay_thumb_get_stabilized_pressure(StrokeCache *cache); -void SCULPT_do_draw_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_draw_brush(Sculpt *sd, Object *ob, blender::Span nodes); -void SCULPT_do_fill_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_scrape_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_flatten_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_clay_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_clay_strips_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_snake_hook_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_thumb_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_rotate_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_layer_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_inflate_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_nudge_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_crease_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_pinch_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_grab_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_elastic_deform_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_draw_sharp_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_slide_relax_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_fill_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_scrape_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_flatten_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_clay_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_clay_strips_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_snake_hook_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_thumb_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_rotate_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_layer_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_inflate_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_nudge_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_crease_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_pinch_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_grab_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_elastic_deform_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_draw_sharp_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_slide_relax_brush(Sculpt *sd, Object *ob, blender::Span nodes); -void SCULPT_do_displacement_smear_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_displacement_eraser_brush(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_mask_brush_draw(Sculpt *sd, Object *ob, Span nodes); -void SCULPT_do_mask_brush(Sculpt *sd, Object *ob, Span nodes); +void SCULPT_do_displacement_smear_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_displacement_eraser_brush(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_mask_brush_draw(Sculpt *sd, Object *ob, blender::Span nodes); +void SCULPT_do_mask_brush(Sculpt *sd, Object *ob, blender::Span nodes); /** \} */ -void SCULPT_bmesh_topology_rake(Sculpt *sd, Object *ob, Span nodes, float bstrength); +void SCULPT_bmesh_topology_rake(Sculpt *sd, + Object *ob, + blender::Span nodes, + float bstrength); /* end sculpt_brush_types.cc */ diff --git a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.cc b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.cc index 6bbefad9def..affe1bf5673 100644 --- a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.cc +++ b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.cc @@ -191,7 +191,7 @@ static void do_multiplane_scrape_brush_task(Object *ob, /* Public functions. */ -void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, Span nodes) +void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, blender::Span nodes) { using namespace blender; SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.cc b/source/blender/editors/sculpt_paint/sculpt_ops.cc index 5c70c21f1d9..cecae101a64 100644 --- a/source/blender/editors/sculpt_paint/sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/sculpt_ops.cc @@ -1278,7 +1278,7 @@ static int sculpt_reveal_all_exec(bContext *C, wmOperator *op) bool with_bmesh = BKE_pbvh_type(ss->pbvh) == PBVH_BMESH; - Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); + blender::Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); if (nodes.is_empty()) { return OPERATOR_CANCELLED; diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.cc b/source/blender/editors/sculpt_paint/sculpt_paint_color.cc index 56b5edd0675..a543d0cc677 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_color.cc +++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.cc @@ -237,8 +237,8 @@ static void do_sample_wet_paint_task(SculptSession *ss, void SCULPT_do_paint_brush(PaintModeSettings *paint_mode_settings, Sculpt *sd, Object *ob, - Span nodes, - Span texnodes) + blender::Span nodes, + blender::Span texnodes) { using namespace blender; if (SCULPT_use_image_paint_brush(paint_mode_settings, ob)) { @@ -489,7 +489,7 @@ static void do_smear_store_prev_colors_task(SculptSession *ss, BKE_pbvh_vertex_iter_end; } -void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, Span nodes) +void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, blender::Span nodes) { using namespace blender; Brush *brush = BKE_paint_brush(&sd->paint); diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc index 159eb7f0b4c..e0fd0b1da80 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc +++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc @@ -579,7 +579,7 @@ bool SCULPT_use_image_paint_brush(PaintModeSettings *settings, Object *ob) void SCULPT_do_paint_brush_image(PaintModeSettings *paint_mode_settings, Sculpt *sd, Object *ob, - Span texnodes) + blender::Span texnodes) { Brush *brush = BKE_paint_brush(&sd->paint); diff --git a/source/blender/editors/sculpt_paint/sculpt_pose.cc b/source/blender/editors/sculpt_paint/sculpt_pose.cc index b694ed4eea3..a2e4a88de15 100644 --- a/source/blender/editors/sculpt_paint/sculpt_pose.cc +++ b/source/blender/editors/sculpt_paint/sculpt_pose.cc @@ -1109,7 +1109,7 @@ static void sculpt_pose_align_pivot_local_space(float r_mat[4][4], ortho_basis_v3v3_v3(r_mat[0], r_mat[1], r_mat[2]); } -void SCULPT_do_pose_brush(Sculpt *sd, Object *ob, Span nodes) +void SCULPT_do_pose_brush(Sculpt *sd, Object *ob, blender::Span nodes) { using namespace blender; SculptSession *ss = ob->sculpt; diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.cc b/source/blender/editors/sculpt_paint/sculpt_smooth.cc index 71944e029f6..e574aae9a62 100644 --- a/source/blender/editors/sculpt_paint/sculpt_smooth.cc +++ b/source/blender/editors/sculpt_paint/sculpt_smooth.cc @@ -226,7 +226,7 @@ static void do_enhance_details_brush_task(Object *ob, BKE_pbvh_vertex_iter_end; } -static void SCULPT_enhance_details_brush(Sculpt *sd, Object *ob, Span nodes) +static void SCULPT_enhance_details_brush(Sculpt *sd, Object *ob, blender::Span nodes) { using namespace blender; SculptSession *ss = ob->sculpt; @@ -317,8 +317,11 @@ static void do_smooth_brush_task(Object *ob, BKE_pbvh_vertex_iter_end; } -void SCULPT_smooth( - Sculpt *sd, Object *ob, Span nodes, float bstrength, const bool smooth_mask) +void SCULPT_smooth(Sculpt *sd, + Object *ob, + blender::Span nodes, + float bstrength, + const bool smooth_mask) { using namespace blender; SculptSession *ss = ob->sculpt; @@ -352,7 +355,7 @@ void SCULPT_smooth( } } -void SCULPT_do_smooth_brush(Sculpt *sd, Object *ob, Span nodes) +void SCULPT_do_smooth_brush(Sculpt *sd, Object *ob, blender::Span nodes) { SculptSession *ss = ob->sculpt; @@ -508,7 +511,7 @@ static void do_surface_smooth_brush_displace_task(Object *ob, const Brush *brush BKE_pbvh_vertex_iter_end; } -void SCULPT_do_surface_smooth_brush(Sculpt *sd, Object *ob, Span nodes) +void SCULPT_do_surface_smooth_brush(Sculpt *sd, Object *ob, blender::Span nodes) { using namespace blender; Brush *brush = BKE_paint_brush(&sd->paint); diff --git a/source/blender/editors/sculpt_paint/sculpt_transform.cc b/source/blender/editors/sculpt_paint/sculpt_transform.cc index e3975540a25..a3807ae7970 100644 --- a/source/blender/editors/sculpt_paint/sculpt_transform.cc +++ b/source/blender/editors/sculpt_paint/sculpt_transform.cc @@ -420,7 +420,7 @@ static int sculpt_set_pivot_position_exec(bContext *C, wmOperator *op) } } else { - Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); + blender::Vector nodes = blender::bke::pbvh::search_gather(ss->pbvh, {}); float avg[3]; int total = 0; diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.cc b/source/blender/editors/sculpt_paint/sculpt_undo.cc index 5d1f9fd7874..ee8d6f9462c 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.cc +++ b/source/blender/editors/sculpt_paint/sculpt_undo.cc @@ -80,6 +80,9 @@ #include "bmesh.h" #include "sculpt_intern.hh" +using blender::Span; +using blender::Vector; + /* Uncomment to print the undo stack in the console on push/undo/redo. */ //#define SCULPT_UNDO_DEBUG