diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-12-30 22:31:31 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-12-30 22:31:31 +0400 |
commit | 22c02c9d3aa589fcedf58e4d7ff4a5c20a18443c (patch) | |
tree | 8b5d74689fe6c2ff3059e71ba0187c124651b5e2 /source/blender/editors/sculpt_paint | |
parent | 21d79cf7691b53265d15efd3f061740611415d45 (diff) |
Code cleanup: rename BLI_pbvh to BKE_pbvh
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_hide.c | 38 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 10 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 216 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 44 |
4 files changed, 154 insertions, 154 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index 9cc908746e8..d50261a3b98 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -112,8 +112,8 @@ static void partialvis_update_mesh(Object *ob, int *vert_indices; int any_changed = 0, any_visible = 0, totvert, i; - BLI_pbvh_node_num_verts(pbvh, node, NULL, &totvert); - BLI_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert); + BKE_pbvh_node_num_verts(pbvh, node, NULL, &totvert); + 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); @@ -136,8 +136,8 @@ static void partialvis_update_mesh(Object *ob, } if (any_changed) { - BLI_pbvh_node_mark_rebuild_draw(node); - BLI_pbvh_node_fully_hidden_set(node, !any_visible); + BKE_pbvh_node_mark_rebuild_draw(node); + BKE_pbvh_node_fully_hidden_set(node, !any_visible); } } @@ -157,11 +157,11 @@ static void partialvis_update_grids(Object *ob, int *grid_indices, totgrid, any_changed, i; /* get PBVH data */ - BLI_pbvh_node_get_grids(pbvh, node, + BKE_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid, NULL, NULL, &grids, NULL); - grid_hidden = BLI_pbvh_grid_hidden(pbvh); - BLI_pbvh_get_grid_key(pbvh, &key); + grid_hidden = BKE_pbvh_grid_hidden(pbvh); + BKE_pbvh_get_grid_key(pbvh, &key); sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN); @@ -226,8 +226,8 @@ static void partialvis_update_grids(Object *ob, /* mark updates if anything was hidden/shown */ if (any_changed) { - BLI_pbvh_node_mark_rebuild_draw(node); - BLI_pbvh_node_fully_hidden_set(node, !any_visible); + BKE_pbvh_node_mark_rebuild_draw(node); + BKE_pbvh_node_fully_hidden_set(node, !any_visible); multires_mark_as_modified(ob, MULTIRES_HIDDEN_MODIFIED); } } @@ -273,9 +273,9 @@ static void partialvis_update_bmesh(Object *ob, GHash *unique, *other; int any_changed = 0, any_visible = 0; - bm = BLI_pbvh_get_bmesh(pbvh); - unique = BLI_pbvh_bmesh_node_unique_verts(node); - other = BLI_pbvh_bmesh_node_other_verts(node); + bm = BKE_pbvh_get_bmesh(pbvh); + unique = BKE_pbvh_bmesh_node_unique_verts(node); + other = BKE_pbvh_bmesh_node_other_verts(node); sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN); @@ -296,8 +296,8 @@ static void partialvis_update_bmesh(Object *ob, &any_visible); if (any_changed) { - BLI_pbvh_node_mark_rebuild_draw(node); - BLI_pbvh_node_fully_hidden_set(node, !any_visible); + BKE_pbvh_node_mark_rebuild_draw(node); + BKE_pbvh_node_fully_hidden_set(node, !any_visible); } } @@ -334,22 +334,22 @@ static void get_pbvh_nodes(PBVH *pbvh, float clip_planes[4][4], PartialVisArea mode) { - BLI_pbvh_SearchCallback cb = NULL; + BKE_pbvh_SearchCallback cb = NULL; /* select search callback */ switch (mode) { case PARTIALVIS_INSIDE: - cb = BLI_pbvh_node_planes_contain_AABB; + cb = BKE_pbvh_node_planes_contain_AABB; break; case PARTIALVIS_OUTSIDE: - cb = BLI_pbvh_node_planes_exclude_AABB; + cb = BKE_pbvh_node_planes_exclude_AABB; break; case PARTIALVIS_ALL: case PARTIALVIS_MASKED: break; } - BLI_pbvh_search_gather(pbvh, cb, clip_planes, nodes, totnode); + BKE_pbvh_search_gather(pbvh, cb, clip_planes, nodes, totnode); } static int hide_show_exec(bContext *C, wmOperator *op) @@ -379,7 +379,7 @@ static int hide_show_exec(bContext *C, wmOperator *op) ob->sculpt->pbvh = pbvh; get_pbvh_nodes(pbvh, &nodes, &totnode, clip_planes, area); - pbvh_type = BLI_pbvh_type(pbvh); + pbvh_type = BKE_pbvh_type(pbvh); /* start undo */ switch (action) { diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 9fe7fc1d3ac..3cf67667f39 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -96,7 +96,7 @@ static int mask_flood_fill_exec(bContext *C, wmOperator *op) pbvh = dm->getPBVH(ob, dm); ob->sculpt->pbvh = pbvh; - BLI_pbvh_search_gather(pbvh, NULL, NULL, &nodes, &totnode); + BKE_pbvh_search_gather(pbvh, NULL, NULL, &nodes, &totnode); sculpt_undo_push_begin("Mask flood fill"); @@ -105,12 +105,12 @@ static int mask_flood_fill_exec(bContext *C, wmOperator *op) sculpt_undo_push_node(ob, nodes[i], SCULPT_UNDO_MASK); - BLI_pbvh_vertex_iter_begin(pbvh, nodes[i], vi, PBVH_ITER_UNIQUE) { + BKE_pbvh_vertex_iter_begin(pbvh, nodes[i], vi, PBVH_ITER_UNIQUE) { mask_flood_fill_set_elem(vi.mask, mode, value); - } BLI_pbvh_vertex_iter_end; + } BKE_pbvh_vertex_iter_end; - BLI_pbvh_node_mark_update(nodes[i]); - if (BLI_pbvh_type(pbvh) == PBVH_GRIDS) + BKE_pbvh_node_mark_update(nodes[i]); + if (BKE_pbvh_type(pbvh) == PBVH_GRIDS) multires_mark_as_modified(ob, MULTIRES_COORDS_MODIFIED); } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 95f997d46b1..e0c8b39ece9 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -383,7 +383,7 @@ static void sculpt_orig_vert_data_update(SculptOrigVertData *orig_data, static int sculpt_stroke_dynamic_topology(const SculptSession *ss, const Brush *brush) { - return ((BLI_pbvh_type(ss->pbvh) == PBVH_BMESH) && + return ((BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) && (!ss->cache || (!ss->cache->alt_smooth)) && @@ -423,7 +423,7 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob) (void)sd; /* quied unused warning */ #endif - BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); + BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { @@ -438,7 +438,7 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob) sculpt_orig_vert_data_unode_init(&orig_data, ob, unode); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { sculpt_orig_vert_data_update(&orig_data, &vd); @@ -452,9 +452,9 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob) } if (vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; - BLI_pbvh_node_mark_update(nodes[n]); + BKE_pbvh_node_mark_update(nodes[n]); } } @@ -481,7 +481,7 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, if (!pbvh) return 0; - BLI_pbvh_redraw_BB(pbvh, bb_min, bb_max); + BKE_pbvh_redraw_BB(pbvh, bb_min, bb_max); /* convert 3D bounding box to screen space */ if (!paint_convert_bb_to_rect(rect, @@ -521,7 +521,7 @@ void sculpt_get_redraw_planes(float planes[4][4], ARegion *ar, /* clear redraw flag from nodes */ if (pbvh) - BLI_pbvh_update(pbvh, PBVH_UpdateRedraw, NULL); + BKE_pbvh_update(pbvh, PBVH_UpdateRedraw, NULL); } /************************ Brush Testing *******************/ @@ -1006,9 +1006,9 @@ static int sculpt_search_sphere_cb(PBVHNode *node, void *data_v) int i; if (data->original) - BLI_pbvh_node_get_original_BB(node, bb_min, bb_max); + BKE_pbvh_node_get_original_BB(node, bb_min, bb_max); else - BLI_pbvh_node_get_BB(node, bb_min, bb_max); + BKE_pbvh_node_get_BB(node, bb_min, bb_max); for (i = 0; i < 3; ++i) { if (bb_min[i] > center[i]) @@ -1082,7 +1082,7 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod sculpt_brush_test_init(ss, &test); if (original) { - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_fast(&test, unode->co[vd.i])) { float fno[3]; @@ -1091,10 +1091,10 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod add_norm_if(ss->cache->view_normal, private_an, private_out_flip, fno); } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } else { - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_fast(&test, vd.co)) { if (vd.no) { @@ -1108,7 +1108,7 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod } } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } #pragma omp critical @@ -1435,7 +1435,7 @@ static void do_mesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, @@ -1463,7 +1463,7 @@ static void do_mesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } static void do_bmesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, float bstrength, int smooth_mask) @@ -1476,7 +1476,7 @@ static void do_bmesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, @@ -1504,7 +1504,7 @@ static void do_bmesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, @@ -1525,9 +1525,9 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no CLAMP(bstrength, 0.0f, 1.0f); - BLI_pbvh_node_get_grids(ss->pbvh, node, &grid_indices, &totgrid, + BKE_pbvh_node_get_grids(ss->pbvh, node, &grid_indices, &totgrid, NULL, &gridsize, &griddata, &gridadj); - BLI_pbvh_get_grid_key(ss->pbvh, &key); + BKE_pbvh_get_grid_key(ss->pbvh, &key); thread_num = 0; #ifdef _OPENMP @@ -1661,7 +1661,7 @@ static void smooth(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, SculptSession *ss = ob->sculpt; const int max_iterations = 4; const float fract = 1.0f / max_iterations; - PBVHType type = BLI_pbvh_type(ss->pbvh); + PBVHType type = BKE_pbvh_type(ss->pbvh); int iteration, n, count; float last; @@ -1721,7 +1721,7 @@ static void do_mask_brush_draw(Sculpt *sd, Object *ob, PBVHNode **nodes, int tot sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { float fade = tex_strength(ss, brush, vd.co, test.dist, @@ -1733,7 +1733,7 @@ static void do_mask_brush_draw(Sculpt *sd, Object *ob, PBVHNode **nodes, int tot if (vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } } @@ -1773,11 +1773,11 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { /* offset vertex */ @@ -1791,7 +1791,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -1829,11 +1829,11 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { /* offset vertex */ @@ -1856,7 +1856,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -1873,11 +1873,11 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, @@ -1892,7 +1892,7 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -1924,11 +1924,11 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) sculpt_orig_vert_data_init(&orig_data, ob, nodes[n]); - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { sculpt_orig_vert_data_update(&orig_data, &vd); @@ -1946,7 +1946,7 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -1970,11 +1970,11 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, @@ -1987,7 +1987,7 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2019,11 +2019,11 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, @@ -2036,7 +2036,7 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2063,11 +2063,11 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode sculpt_orig_vert_data_init(&orig_data, ob, nodes[n]); - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { sculpt_orig_vert_data_update(&orig_data, &vd); @@ -2085,7 +2085,7 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2117,11 +2117,11 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod sculpt_orig_vert_data_init(&orig_data, ob, nodes[n]); - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { sculpt_orig_vert_data_update(&orig_data, &vd); @@ -2141,7 +2141,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2166,18 +2166,18 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode SculptOrigVertData orig_data; float *layer_disp; /* XXX: layer brush needs conversion to proxy but its more complicated */ - /* proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; */ + /* proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; */ sculpt_orig_vert_data_init(&orig_data, ob, nodes[n]); #pragma omp critical { - layer_disp = BLI_pbvh_node_layer_disp_get(ss->pbvh, nodes[n]); + layer_disp = BKE_pbvh_node_layer_disp_get(ss->pbvh, nodes[n]); } sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { sculpt_orig_vert_data_update(&orig_data, &vd); @@ -2212,7 +2212,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2229,11 +2229,11 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, @@ -2251,7 +2251,7 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2278,24 +2278,24 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to sculpt_brush_test_init(ss, &test); if (ss->cache->original) { - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_fast(&test, unode->co[vd.i])) { add_v3_v3(private_fc, unode->co[vd.i]); private_count++; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } else { - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_fast(&test, vd.co)) { add_v3_v3(private_fc, vd.co); private_count++; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } #pragma omp critical @@ -2345,7 +2345,7 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob, sculpt_brush_test_init(ss, &test); if (ss->cache->original && unode->co) { - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_fast(&test, unode->co[vd.i])) { /* for area normal */ @@ -2359,10 +2359,10 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob, private_count++; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } else { - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_fast(&test, vd.co)) { /* for area normal */ @@ -2381,7 +2381,7 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob, private_count++; } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } #pragma omp critical @@ -2563,11 +2563,11 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_sq(&test, vd.co)) { float intr[3]; @@ -2588,7 +2588,7 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno } } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2635,11 +2635,11 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_sq(&test, vd.co)) { if (plane_point_side_flip(vd.co, an, fc, flip)) { @@ -2663,7 +2663,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2737,11 +2737,11 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_cube(&test, vd.co, mat)) { if (plane_point_side_flip(vd.co, sn, fc, flip)) { @@ -2765,7 +2765,7 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t } } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2801,11 +2801,11 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_sq(&test, vd.co)) { if (plane_point_side(vd.co, an, fc)) { @@ -2829,7 +2829,7 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2865,11 +2865,11 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod SculptBrushTest test; float (*proxy)[3]; - proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BKE_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test_sq(&test, vd.co)) { if (!plane_point_side(vd.co, an, fc)) { @@ -2893,7 +2893,7 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } } @@ -2975,7 +2975,7 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush) SCULPT_TOOL_THUMB, SCULPT_TOOL_LAYER); - BLI_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode); + BKE_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode); /* Only act if some verts are inside the brush area */ if (totnode) { @@ -2991,16 +2991,16 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush) sculpt_undo_push_node(ob, nodes[n], brush->sculpt_tool == SCULPT_TOOL_MASK ? SCULPT_UNDO_MASK : SCULPT_UNDO_COORDS); - BLI_pbvh_node_mark_update(nodes[n]); + BKE_pbvh_node_mark_update(nodes[n]); - if (BLI_pbvh_type(ss->pbvh) == PBVH_BMESH) { - BLI_pbvh_node_mark_topology_update(nodes[n]); - BLI_pbvh_bmesh_node_save_orig(nodes[n]); + if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) { + BKE_pbvh_node_mark_topology_update(nodes[n]); + BKE_pbvh_bmesh_node_save_orig(nodes[n]); } } - if (BLI_pbvh_type(ss->pbvh) == PBVH_BMESH) { - BLI_pbvh_bmesh_update_topology(ss->pbvh, mode, + if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) { + BKE_pbvh_bmesh_update_topology(ss->pbvh, mode, ss->cache->location, ss->cache->radius); } @@ -3025,7 +3025,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB, SCULPT_TOOL_LAYER); - BLI_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode); + BKE_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode); /* Only act if some verts are inside the brush area */ if (totnode) { @@ -3034,7 +3034,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) sculpt_undo_push_node(ob, nodes[n], brush->sculpt_tool == SCULPT_TOOL_MASK ? SCULPT_UNDO_MASK : SCULPT_UNDO_COORDS); - BLI_pbvh_node_mark_update(nodes[n]); + BKE_pbvh_node_mark_update(nodes[n]); } if (brush_needs_sculpt_normal(brush)) @@ -3142,7 +3142,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob) PBVHNode **nodes; int totnode, n; - BLI_pbvh_gather_proxies(ss->pbvh, &nodes, &totnode); + BKE_pbvh_gather_proxies(ss->pbvh, &nodes, &totnode); if (!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) { /* these brushes start from original coordinates */ @@ -3159,9 +3159,9 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob) if (use_orco && !ss->bm) orco = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS)->co; - BLI_pbvh_node_get_proxies(nodes[n], &proxies, &proxy_count); + BKE_pbvh_node_get_proxies(nodes[n], &proxies, &proxy_count); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { float val[3]; int p; @@ -3186,9 +3186,9 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob) if (ss->modifiers_active) sculpt_flush_pbvhvert_deform(ob, &vd); } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; - BLI_pbvh_node_free_proxies(nodes[n]); + BKE_pbvh_node_free_proxies(nodes[n]); } } @@ -3205,7 +3205,7 @@ static void sculpt_update_keyblock(Object *ob) /* Keyblock update happens after handling deformation caused by modifiers, * so ss->orig_cos would be updated with new stroke */ if (ss->orig_cos) vertCos = ss->orig_cos; - else vertCos = BLI_pbvh_get_vertCos(ss->pbvh); + else vertCos = BKE_pbvh_get_vertCos(ss->pbvh); if (vertCos) { sculpt_vertcos_to_key(ob, ss->kb, vertCos); @@ -3233,13 +3233,13 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob) if (ss->kb) vertCos = MEM_callocN(sizeof(*vertCos) * me->totvert, "flushStrokeDeofrm keyVerts"); - BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); + BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { sculpt_flush_pbvhvert_deform(ob, &vd); @@ -3248,7 +3248,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob) copy_v3_v3(vertCos[index], ss->orig_cos[index]); } } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } if (vertCos) { @@ -3463,7 +3463,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, ss->orig_cos = (ss->kb) ? BKE_key_convert_to_vertcos(ob, ss->kb) : mesh_getVertexCos(me, NULL); crazyspace_build_sculpt(scene, ob, &ss->deform_imats, &ss->deform_cos); - BLI_pbvh_apply_vertCos(ss->pbvh, ss->deform_cos); + BKE_pbvh_apply_vertCos(ss->pbvh, ss->deform_cos); for (a = 0; a < me->totvert; ++a) { invert_m3(ss->deform_imats[a]); @@ -3473,12 +3473,12 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, else free_sculptsession_deformMats(ss); /* if pbvh is deformed, key block is already applied to it */ - if (ss->kb && !BLI_pbvh_isDeformed(ss->pbvh)) { + if (ss->kb && !BKE_pbvh_isDeformed(ss->pbvh)) { float (*vertCos)[3] = BKE_key_convert_to_vertcos(ob, ss->kb); if (vertCos) { /* apply shape keys coordinates to PBVH */ - BLI_pbvh_apply_vertCos(ss->pbvh, vertCos); + BKE_pbvh_apply_vertCos(ss->pbvh, vertCos); MEM_freeN(vertCos); } } @@ -3614,7 +3614,7 @@ static void sculpt_omp_start(Sculpt *sd, SculptSession *ss) if (ss->multires) { int i, gridsize, array_mem_size; - BLI_pbvh_node_get_grids(ss->pbvh, NULL, NULL, NULL, NULL, + BKE_pbvh_node_get_grids(ss->pbvh, NULL, NULL, NULL, NULL, &gridsize, NULL, NULL); array_mem_size = cache->num_threads * sizeof(void *); @@ -4045,13 +4045,13 @@ typedef struct { static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float *tmin) { - if (BLI_pbvh_node_get_tmin(node) < *tmin) { + if (BKE_pbvh_node_get_tmin(node) < *tmin) { SculptRaycastData *srd = data_v; float (*origco)[3] = NULL; int use_origco = FALSE; if (srd->original && srd->ss->cache) { - if (BLI_pbvh_type(srd->ss->pbvh) == PBVH_BMESH) { + if (BKE_pbvh_type(srd->ss->pbvh) == PBVH_BMESH) { use_origco = TRUE; } else { @@ -4062,7 +4062,7 @@ static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float *tmin) } } - if (BLI_pbvh_node_raycast(srd->ss->pbvh, node, origco, use_origco, + if (BKE_pbvh_node_raycast(srd->ss->pbvh, node, origco, use_origco, srd->ray_start, srd->ray_normal, &srd->dist)) { srd->hit = 1; @@ -4113,7 +4113,7 @@ int sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2]) srd.dist = dist; srd.hit = 0; srd.original = (cache) ? cache->original : 0; - BLI_pbvh_raycast(ss->pbvh, sculpt_raycast_cb, &srd, + BKE_pbvh_raycast(ss->pbvh, sculpt_raycast_cb, &srd, ray_start, ray_normal, srd.original); copy_v3_v3(out, ray_normal); @@ -4196,7 +4196,7 @@ static void sculpt_flush_update(bContext *C) else { rcti r; - BLI_pbvh_update(ss->pbvh, PBVH_UpdateBB, NULL); + BKE_pbvh_update(ss->pbvh, PBVH_UpdateBB, NULL); if (sculpt_get_redraw_rect(ar, CTX_wm_region_view3d(C), ob, &r)) { if (ss->cache) ss->cache->previous_r = r; @@ -4257,7 +4257,7 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *stroke, P sculpt_update_cache_variants(C, sd, ob, stroke, itemptr); sculpt_restore_mesh(sd, ob); - BLI_pbvh_bmesh_detail_size_set(ss->pbvh, + BKE_pbvh_bmesh_detail_size_set(ss->pbvh, (ss->cache->radius / (float)ss->cache->pixel_radius) * (float)sd->detail_size); @@ -4336,10 +4336,10 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str sculpt_undo_push_end(); - BLI_pbvh_update(ss->pbvh, PBVH_UpdateOriginalBB, NULL); + BKE_pbvh_update(ss->pbvh, PBVH_UpdateOriginalBB, NULL); - if (BLI_pbvh_type(ss->pbvh) == PBVH_BMESH) - BLI_pbvh_bmesh_after_stroke(ss->pbvh); + if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) + BKE_pbvh_bmesh_after_stroke(ss->pbvh); /* optimization: if there is locked key and active modifiers present in */ /* the stack, keyblock is updating at each step. otherwise we could update */ @@ -4510,7 +4510,7 @@ void sculpt_pbvh_clear(Object *ob) /* Clear out any existing DM and PBVH */ if (ss->pbvh) - BLI_pbvh_free(ss->pbvh); + BKE_pbvh_free(ss->pbvh); ss->pbvh = NULL; if (dm) dm->getPBVH(NULL, dm); diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 08e61a6d05d..c828e8c8651 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -73,10 +73,10 @@ static void update_cb(PBVHNode *node, void *rebuild) { - BLI_pbvh_node_mark_update(node); + BKE_pbvh_node_mark_update(node); if (*((int *)rebuild)) - BLI_pbvh_node_mark_rebuild_draw(node); - BLI_pbvh_node_fully_hidden_set(node, 0); + BKE_pbvh_node_mark_rebuild_draw(node); + BKE_pbvh_node_fully_hidden_set(node, 0); } static void sculpt_undo_restore_deformed(const SculptSession *ss, @@ -143,7 +143,7 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo /* pbvh uses it's own mvert array, so coords should be */ /* propagated to pbvh here */ - BLI_pbvh_apply_vertCos(ss->pbvh, vertCos); + BKE_pbvh_apply_vertCos(ss->pbvh, vertCos); MEM_freeN(vertCos); } @@ -443,8 +443,8 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) /* we update all nodes still, should be more clever, but also * needs to work correct when exiting/entering sculpt mode and * the nodes get recreated, though in that case it could do all */ - BLI_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb, &rebuild); - BLI_pbvh_update(ss->pbvh, PBVH_UpdateBB | PBVH_UpdateOriginalBB | PBVH_UpdateRedraw, NULL); + BKE_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb, &rebuild); + BKE_pbvh_update(ss->pbvh, PBVH_UpdateBB | PBVH_UpdateOriginalBB | PBVH_UpdateRedraw, NULL); if ((mmd = sculpt_multires_active(scene, ob))) { if (rebuild) @@ -531,9 +531,9 @@ static void sculpt_undo_alloc_and_store_hidden(PBVH *pbvh, BLI_bitmap *grid_hidden; int i, *grid_indices, totgrid; - grid_hidden = BLI_pbvh_grid_hidden(pbvh); + grid_hidden = BKE_pbvh_grid_hidden(pbvh); - BLI_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid, + BKE_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid, NULL, NULL, NULL, NULL); unode->grid_hidden = MEM_mapallocN(sizeof(BLI_bitmap) * totgrid, @@ -561,8 +561,8 @@ static SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node, unode->node = node; if (node) { - BLI_pbvh_node_num_verts(ss->pbvh, node, &totvert, &allvert); - BLI_pbvh_node_get_grids(ss->pbvh, node, &grids, &totgrid, + BKE_pbvh_node_num_verts(ss->pbvh, node, &totvert, &allvert); + BKE_pbvh_node_get_grids(ss->pbvh, node, &grids, &totgrid, &maxgrid, &gridsize, NULL, NULL); unode->totvert = totvert; @@ -624,7 +624,7 @@ static void sculpt_undo_store_coords(Object *ob, SculptUndoNode *unode) SculptSession *ss = ob->sculpt; PBVHVertexIter vd; - BLI_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL) + BKE_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL) { copy_v3_v3(unode->co[vd.i], vd.co); if (vd.no) copy_v3_v3_short(unode->no[vd.i], vd.no); @@ -633,7 +633,7 @@ static void sculpt_undo_store_coords(Object *ob, SculptUndoNode *unode) if (ss->modifiers_active) copy_v3_v3(unode->orig_co[vd.i], ss->orig_cos[unode->index[vd.i]]); } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } static void sculpt_undo_store_hidden(Object *ob, SculptUndoNode *unode) @@ -649,8 +649,8 @@ static void sculpt_undo_store_hidden(Object *ob, SculptUndoNode *unode) int *vert_indices, allvert; int i; - BLI_pbvh_node_num_verts(pbvh, node, NULL, &allvert); - BLI_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert); + BKE_pbvh_node_num_verts(pbvh, node, NULL, &allvert); + BKE_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert); for (i = 0; i < allvert; i++) { BLI_BITMAP_MODIFY(unode->vert_hidden, i, mvert[vert_indices[i]].flag & ME_HIDE); @@ -663,11 +663,11 @@ static void sculpt_undo_store_mask(Object *ob, SculptUndoNode *unode) SculptSession *ss = ob->sculpt; PBVHVertexIter vd; - BLI_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL) + BKE_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL) { unode->mask[vd.i] = *vd.mask; } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; } static SculptUndoNode *sculpt_undo_bmesh_push(Object *ob, @@ -728,10 +728,10 @@ static SculptUndoNode *sculpt_undo_bmesh_push(Object *ob, case SCULPT_UNDO_MASK: /* Before any vertex values get modified, ensure their * original positions are logged */ - BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_ALL) { + BKE_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_ALL) { BM_log_vert_before_modified(ss->bm, ss->bm_log, vd.bm_vert); } - BLI_pbvh_vertex_iter_end; + BKE_pbvh_vertex_iter_end; break; case SCULPT_UNDO_DYNTOPO_BEGIN: @@ -777,14 +777,14 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, if (unode->grids) { int totgrid, *grids; - BLI_pbvh_node_get_grids(ss->pbvh, node, &grids, &totgrid, + BKE_pbvh_node_get_grids(ss->pbvh, node, &grids, &totgrid, NULL, NULL, NULL, NULL); memcpy(unode->grids, grids, sizeof(int) * totgrid); } else { int *vert_indices, allvert; - BLI_pbvh_node_num_verts(ss->pbvh, node, NULL, &allvert); - BLI_pbvh_node_get_verts(ss->pbvh, node, &vert_indices, NULL); + BKE_pbvh_node_num_verts(ss->pbvh, node, NULL, &allvert); + BKE_pbvh_node_get_verts(ss->pbvh, node, &vert_indices, NULL); memcpy(unode->index, vert_indices, sizeof(int) * unode->totvert); } @@ -831,7 +831,7 @@ void sculpt_undo_push_end(void) } if (unode->node) - BLI_pbvh_node_layer_disp_free(unode->node); + BKE_pbvh_node_layer_disp_free(unode->node); } undo_paint_push_end(UNDO_PAINT_MESH); |