Sculpt-dev: fix a few merge errors

This commit is contained in:
Joseph Eagar 2022-01-25 15:14:06 -08:00
parent 3165ec4dac
commit 0e7e759a33
8 changed files with 6 additions and 19 deletions

View File

@ -1518,8 +1518,6 @@ static void sculpt_cursor_draw_3D_face_set_preview(PaintCursorContext *pcontext)
GPU_line_width(1.0f);
sculpt_cursor_draw_active_face_set_color_set(pcontext);
int fi = BKE_pbvh_face_index_to_table(ss->pbvh, ss->active_face_index);
/*
MPoly *poly = &ss->mpoly[fi];
MLoop *loops = ss->mloop;

View File

@ -490,7 +490,7 @@ void do_draw_face_sets_brush_task_cb_ex(void *__restrict userdata,
brush,
v->co,
sqrtf(test.dist),
ss->vert_normals + ml->v,
ss->vert_normals[ml->v],
fno,
mask,
(SculptVertRef){.i = ml->v},
@ -2680,7 +2680,6 @@ static void island_stack_mesh_do(SculptSession *ss,
BLI_array_declare(faces);
BLI_array_len_set(faces, *r_totfaces);
int i = 0;
MPoly *mp = ss->mpoly + face.i;
MLoop *ml = ss->mloop + mp->loopstart;

View File

@ -133,7 +133,6 @@ static int sculpt_face_set_by_topology_invoke(bContext *C, wmOperator *op, const
SCULPT_undo_push_begin(ob, "face set edit");
SCULPT_undo_push_node(ob, nodes[0], SCULPT_UNDO_FACE_SETS);
const int initial_poly_i = BKE_pbvh_face_index_to_table(ss->pbvh, ss->active_face_index);
const SculptFaceRef initial_poly = ss->active_face_index;
const SculptEdgeRef initial_edge = sculpt_poly_loop_initial_edge_from_cursor(ob);

View File

@ -346,8 +346,6 @@ static float sculpt_ipmask_vertex_grow_cb(SculptSession *ss,
const SculptVertRef vertex,
float *current_mask)
{
int vertex_i = BKE_pbvh_vertex_index_to_table(ss->pbvh, vertex);
float max = 0.0f;
SculptVertexNeighborIter ni;
SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN (ss, vertex, ni) {
@ -364,8 +362,6 @@ static float sculpt_ipmask_vertex_shrink_cb(SculptSession *ss,
const SculptVertRef vertex,
float *current_mask)
{
int vertex_i = BKE_pbvh_vertex_index_to_table(ss->pbvh, vertex);
float min = 1.0f;
SculptVertexNeighborIter ni;
SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN (ss, vertex, ni) {

View File

@ -352,7 +352,7 @@ static void mesh_filter_task_cb(void *__restrict userdata,
PBVHVertexIter vd;
BKE_pbvh_vertex_iter_begin (ss->pbvh, node, vd, PBVH_ITER_UNIQUE) {
SCULPT_orig_vert_data_update(&orig_data, vd.vertex);
float orig_co[3], oldco[3], oldno[3], val[3], avg[3], normal[3], disp[3];
float orig_co[3], oldco[3], oldno[3], val[3], avg[3], disp[3];
float disp2[3], transform[3][3], final_pos[3];
float fade = vd.mask ? *vd.mask : 0.0f;

View File

@ -722,7 +722,6 @@ static float *SCULPT_geodesic_grids_create(Object *ob,
float (*cos)[3])
{
SculptSession *ss = ob->sculpt;
Mesh *mesh = BKE_object_get_original_mesh(ob);
const int totvert = SCULPT_vertex_count_get(ss);
@ -831,7 +830,6 @@ static float *SCULPT_geodesic_grids_create(Object *ob,
int v1b = -1, v2b = -1;
TempEdge *te = edges + i;
SculptVertexNeighborIter ni2;
for (int j = 0; j < vmap[te->v1].count; j++) {
TempEdge *te2 = edges + vmap[te->v1].indices[j];
@ -912,8 +910,6 @@ static float *SCULPT_geodesic_grids_create(Object *ob,
cos);
}
TempEdge *te = edges + e;
for (int pi = 0; pi < 4; pi++) {
int v_other = e_otherv_map[e][pi];
@ -981,7 +977,6 @@ static float *SCULPT_geodesic_fallback_create(Object *ob, GSet *initial_vertices
{
SculptSession *ss = ob->sculpt;
Mesh *mesh = BKE_object_get_original_mesh(ob);
const int totvert = SCULPT_vertex_count_get(ss);
float *dists = MEM_malloc_arrayN(totvert, sizeof(float), "distances");
SculptVertRef first_affected = {SCULPT_GEODESIC_VERTEX_NONE};

View File

@ -1818,10 +1818,11 @@ void SCULPT_surface_smooth_displace_step(SculptSession *ss,
void SCULPT_do_surface_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode);
/* Slide/Relax */
void SCULPT_relax_vertex(struct SculptSession *ss,
struct PBVHVertexIter *vd,
void SCULPT_relax_vertex(SculptSession *ss,
PBVHVertexIter *vd,
float factor,
bool filter_boundary_face_sets,
SculptBoundaryType boundary_mask,
float *r_final_pos);
/** \} */

View File

@ -842,7 +842,6 @@ static SculptPoseIKChain *pose_ik_chain_init_face_sets(
int prev_face_set = SCULPT_FACE_SET_NONE;
SculptVertRef current_vertex = SCULPT_active_vertex_get(ss);
int current_vertex_i = BKE_pbvh_vertex_index_to_table(ss->pbvh, current_vertex);
for (int s = 0; s < ik_chain->tot_segments; s++) {