Merge branch 'blender-v4.3-release'

This commit is contained in:
Campbell Barton
2024-10-22 15:58:37 +11:00
5 changed files with 29 additions and 16 deletions

View File

@@ -103,7 +103,7 @@ static void deform_verts(ModifierData *md,
/* Silly that defaxis and BKE_curve_deform_coords are off by 1
* but leave for now to save having to call do_versions */
const int defaxis = std::clamp(cmd->defaxis - 1, 0, 5);
BKE_curve_deform_coords(cmd->object,
ctx->object,
reinterpret_cast<float(*)[3]>(positions.data()),
@@ -111,7 +111,7 @@ static void deform_verts(ModifierData *md,
dvert,
defgrp_index,
cmd->flag,
cmd->defaxis - 1);
defaxis);
}
static void deform_verts_EM(ModifierData *md,
@@ -136,6 +136,7 @@ static void deform_verts_EM(ModifierData *md,
}
}
const int defaxis = std::clamp(cmd->defaxis - 1, 0, 5);
if (use_dverts) {
BKE_curve_deform_coords_with_editmesh(cmd->object,
ctx->object,
@@ -143,7 +144,7 @@ static void deform_verts_EM(ModifierData *md,
positions.size(),
defgrp_index,
cmd->flag,
cmd->defaxis - 1,
defaxis,
em);
}
else {
@@ -154,7 +155,7 @@ static void deform_verts_EM(ModifierData *md,
nullptr,
defgrp_index,
cmd->flag,
cmd->defaxis - 1);
defaxis);
}
}

View File

@@ -288,7 +288,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd,
const MDeformVert *dvert;
/* This is historically the lock axis, _not_ the deform axis as the name would imply */
const int deform_axis = smd->deform_axis;
const int deform_axis = std::clamp(int(smd->deform_axis), 0, 2);
int lock_axis = smd->axis;
if (smd->mode == MOD_SIMPLEDEFORM_MODE_BEND) { /* Bend mode shouldn't have any lock axis */
lock_axis = 0;