Fix: Knife tool does not interpolate vertex customdata in interior cuts #107367

1 changed files with 2 additions and 7 deletions
Showing only changes of commit b3e9882cc2 - Show all commits

View File

@ -576,13 +576,8 @@ bool BM_face_split_edgenet(BMesh *bm,
BMLoop *l_other;
/* See: #BM_loop_interp_from_face for similar logic. */
void **blocks, **vblocks;
if (has_interp_ldata) {
blocks = BLI_array_alloca(blocks, f->len);
}
if (has_interp_vdata) {
vblocks = BLI_array_alloca(blocks, f->len);
}
void **blocks = has_interp_ldata ? BLI_array_alloca(blocks, f->len) : NULL;

Prefer void **blocks = has_interp_ldata ? BLI_array_alloca(blocks, f->len) : NULL; - uses less space & doesn't leave unassigned.

Prefer `void **blocks = has_interp_ldata ? BLI_array_alloca(blocks, f->len) : NULL;` - uses less space & doesn't leave unassigned.
void **vblocks = has_interp_vdata ? BLI_array_alloca(blocks, f->len) : NULL;
float(*cos_2d)[2] = BLI_array_alloca(cos_2d, f->len);
float *w = BLI_array_alloca(w, f->len);
float axis_mat[3][3];