diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-07-27 13:04:52 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-07-28 15:59:50 +0300 |
commit | dfc597202f769e493b145adb27407f1691102e15 (patch) | |
tree | dd6c4ec13a6699a3fe8390f858524c4b4b4afbeb /source/blender/blenkernel/intern/displist.cc | |
parent | 7d0765cbdcf272f901c80fb9fd765428fc89ba02 (diff) |
Fix T90154, T90213: curve issues since recent cleanup commit
Caused by {rB8cbff7093d65}.
Since above commit only one modifier would get calculated and the
displaylist boundingbox was calculated wrong.
Maniphest Tasks: T90154
Differential Revision: https://developer.blender.org/D12037
Diffstat (limited to 'source/blender/blenkernel/intern/displist.cc')
-rw-r--r-- | source/blender/blenkernel/intern/displist.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc index a4ffaa8b10b..99dc1db9d38 100644 --- a/source/blender/blenkernel/intern/displist.cc +++ b/source/blender/blenkernel/intern/displist.cc @@ -903,6 +903,7 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph, Mesh *modified = nullptr; float(*vertCos)[3] = nullptr; + int totvert = 0; for (; md; md = md->next) { const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type); @@ -929,7 +930,6 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph, if (mti->type == eModifierTypeType_OnlyDeform || (mti->type == eModifierTypeType_DeformOrConstruct && !modified)) { if (modified) { - int totvert = 0; if (!vertCos) { vertCos = BKE_mesh_vert_coords_alloc(modified, &totvert); } @@ -939,7 +939,6 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph, mti->deformVerts(md, &mectx_deform, modified, vertCos, totvert); } else { - int totvert = 0; if (!vertCos) { vertCos = displist_vert_coords_alloc(dispbase, &totvert); } @@ -1668,7 +1667,7 @@ void BKE_displist_minmax(const ListBase *dispbase, float min[3], float max[3]) LISTBASE_FOREACH (const DispList *, dl, dispbase) { const int tot = (dl->type == DL_INDEX3) ? dl->nr : dl->nr * dl->parts; for (const int i : IndexRange(tot)) { - minmax_v3v3_v3(min, max, &dl->verts[i]); + minmax_v3v3_v3(min, max, &dl->verts[i * 3]); } if (tot != 0) { doit = true; |