diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_shapekey.c | 7 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index f9704343fdd..8fead6024fb 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -57,6 +57,7 @@ #include "BKE_library.h" #include "BKE_main.h" #include "BKE_object.h" +#include "BKE_lattice.h" #include "BKE_curve.h" #include "BLI_sys_types.h" // for intptr_t support @@ -244,14 +245,14 @@ static bool object_shape_key_mirror(bContext *C, Object *ob, int u_inv = (lt->pntsu - 1) - u; float tvec[3]; if (u == u_inv) { - i1 = LT_INDEX(lt, u, v, w); + i1 = BKE_lattice_index_from_uvw(lt, u, v, w); fp1 = ((float *)kb->data) + i1 * 3; fp1[0] = -fp1[0]; totmirr++; } else { - i1 = LT_INDEX(lt, u, v, w); - i2 = LT_INDEX(lt, u_inv, v, w); + i1 = BKE_lattice_index_from_uvw(lt, u, v, w); + i2 = BKE_lattice_index_from_uvw(lt, u_inv, v, w); fp1 = ((float *)kb->data) + i1 * 3; fp2 = ((float *)kb->data) + i2 * 3; diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 2f163a358bc..c5efa91d105 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -2477,8 +2477,8 @@ void ED_vgroup_mirror(Object *ob, if (u != u_inv) { BPoint *bp, *bp_mirr; - i1 = LT_INDEX(lt, u, v, w); - i2 = LT_INDEX(lt, u_inv, v, w); + i1 = BKE_lattice_index_from_uvw(lt, u, v, w); + i2 = BKE_lattice_index_from_uvw(lt, u_inv, v, w); bp = <->def[i1]; bp_mirr = <->def[i2]; |