Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-24 17:45:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-24 17:45:35 +0400
commit1a55b53375cf45481e3916d9d3a96c7ce4204e73 (patch)
treee087353ec83945db6a9ee807745b4390a0b0d8ca /source/blender/editors/object/object_shapekey.c
parentc42c9cb234524fcde6248df686d359c2fa827fcd (diff)
lattice: use functions rather then defines, also added a function to get uvw from an index.
- BKE_lattice_index_from_uvw() - BKE_lattice_index_to_uvw()
Diffstat (limited to 'source/blender/editors/object/object_shapekey.c')
-rw-r--r--source/blender/editors/object/object_shapekey.c7
1 files changed, 4 insertions, 3 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;