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:
authorSergey Sharybin <sergey.vfx@gmail.com>2010-08-10 10:36:42 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2010-08-10 10:36:42 +0400
commitc0e39df6ac42d137fd51eeea463aace856bf97d4 (patch)
tree86be54ecb6f01b8192905a05707b12402970d5a4 /source/blender/editors
parent41531e4fb6547df543a80d62b473c250d5b78753 (diff)
- Enable shape key switching in edit mode for curves, surfaces and latticies
- Disable changing of lattice size if there are shape keys
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/curve/editcurve.c7
-rw-r--r--source/blender/editors/include/ED_lattice.h33
-rw-r--r--source/blender/editors/interface/interface_templates.c6
-rw-r--r--source/blender/editors/object/object_edit.c8
-rw-r--r--source/blender/editors/object/object_hook.c11
-rw-r--r--source/blender/editors/object/object_intern.h5
-rw-r--r--source/blender/editors/object/object_lattice.c116
-rw-r--r--source/blender/editors/object/object_relations.c4
-rw-r--r--source/blender/editors/object/object_vgroup.c6
-rw-r--r--source/blender/editors/space_info/info_stats.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c8
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/editors/transform/transform_generics.c2
-rw-r--r--source/blender/editors/transform/transform_manipulator.c4
16 files changed, 132 insertions, 96 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 7150070dd65..b85429e36a9 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -724,7 +724,7 @@ static void calc_shapeKeys(Object *obedit)
int a, i, j;
EditNurb *editnurb= cu->editnurb;
KeyBlock *currkey;
- KeyBlock *actkey= ob_get_keyblock(obedit);
+ KeyBlock *actkey= BLI_findlink(&cu->key->block, editnurb->shapenr-1);
BezTriple *bezt, *oldbezt;
BPoint *bp, *oldbp;
Nurb *nu;
@@ -738,7 +738,7 @@ static void calc_shapeKeys(Object *obedit)
int act_is_basis = 0;
/* find if this key is a basis for any others */
for(currkey = cu->key->block.first; currkey; currkey= currkey->next) {
- if(obedit->shapenr-1 == currkey->relative) {
+ if(editnurb->shapenr-1 == currkey->relative) {
act_is_basis = 1;
break;
}
@@ -806,7 +806,7 @@ static void calc_shapeKeys(Object *obedit)
currkey = cu->key->block.first;
while(currkey) {
- int apply_offset = (ofs && (currkey != actkey) && (obedit->shapenr-1 == currkey->relative));
+ int apply_offset = (ofs && (currkey != actkey) && (editnurb->shapenr-1 == currkey->relative));
fp= newkey= MEM_callocN(cu->key->elemsize * totvert, "currkey->data");
ofp= oldkey = currkey->data;
@@ -1035,6 +1035,7 @@ void make_editNurb(Object *obedit)
}
if(actkey) {
+ editnurb->shapenr= obedit->shapenr;
init_editNurb_keyIndex(editnurb, &cu->nurb);
}
}
diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h
new file mode 100644
index 00000000000..bebd6c5f3ab
--- /dev/null
+++ b/source/blender/editors/include/ED_lattice.h
@@ -0,0 +1,33 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+struct Object;
+
+void free_editLatt(struct Object *ob);
+void make_editLatt(struct Object *obedit);
+void load_editLatt(struct Object *obedit);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index bebec77ce1a..eb99a45d62d 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2097,12 +2097,6 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
/* list item behind label & other buttons */
sub= uiLayoutRow(overlap, 0);
- if(itemptr->type == &RNA_ShapeKey) {
- ob= (Object*)activeptr->data;
- if(ob->mode == OB_MODE_EDIT && !(ob->type == OB_MESH))
- uiLayoutSetEnabled(sub, 0);
- }
-
but= uiDefButR(block, LISTROW, 0, "", 0,0, UI_UNIT_X*10,UI_UNIT_Y, activeptr, activepropname, 0, 0, i, 0, 0, "");
uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index f7bde077740..36879e43fe2 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -78,6 +78,7 @@
#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_mball.h"
+#include "ED_lattice.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_util.h"
@@ -938,14 +939,15 @@ void special_editmenu(Scene *scene, View3D *v3d)
static float weight= 1.0f;
{ // XXX
// XXX if(fbutton(&weight, 0.0f, 1.0f, 10, 10, "Set Weight")) {
- int a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
- BPoint *bp= lt->editlatt->def;
+ Lattice *editlt= lt->editlatt->latt;
+ int a= editlt->pntsu*editlt->pntsv*editlt->pntsw;
+ BPoint *bp= editlt->def;
while(a--) {
if(bp->f1 & SELECT)
bp->weight= weight;
bp++;
- }
+ }
}
}
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 2ee82a194cc..75e22d5356f 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -191,13 +191,14 @@ static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar
static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
{
- Lattice *lt= obedit->data;
+ Lattice *lt= obedit->data, *editlt;
BPoint *bp;
int index=0, nr=0, a;
-
+
+ editlt= lt->editlatt->latt;
/* count */
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
- bp= lt->editlatt->def;
+ a= editlt->pntsu*editlt->pntsv*editlt->pntsw;
+ bp= editlt->def;
while(a--) {
if(hmd->indexar[index]==nr) {
bp->f1 |= SELECT;
@@ -313,7 +314,7 @@ static int object_hook_index_array(Object *obedit, int *tot, int **indexar, char
case OB_LATTICE:
{
Lattice *lt= obedit->data;
- return return_editlattice_indexar(lt->editlatt, tot, indexar, cent_r);
+ return return_editlattice_indexar(lt->editlatt->latt, tot, indexar, cent_r);
}
default:
return 0;
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index bd48db2f780..ed75c4060a2 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -131,11 +131,6 @@ void OBJECT_OT_hook_reset(struct wmOperatorType *ot);
void OBJECT_OT_hook_recenter(struct wmOperatorType *ot);
/* object_lattice.c */
-void free_editLatt(struct Object *ob);
-void make_editLatt(struct Object *obedit);
-void load_editLatt(struct Object *obedit);
-void remake_editLatt(struct Object *obedit);
-
void LATTICE_OT_select_all(struct wmOperatorType *ot);
void LATTICE_OT_make_regular(struct wmOperatorType *ot);
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index a1fb10e350e..9f82a1209cf 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -46,6 +46,8 @@
#include "BKE_lattice.h"
#include "BKE_mesh.h"
+#include "BLI_listbase.h"
+
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_util.h"
@@ -62,12 +64,16 @@ void free_editLatt(Object *ob)
Lattice *lt= ob->data;
if(lt->editlatt) {
- if(lt->editlatt->def)
- MEM_freeN(lt->editlatt->def);
- if(lt->editlatt->dvert)
- free_dverts(lt->editlatt->dvert, lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw);
-
+ Lattice *editlt= lt->editlatt->latt;
+
+ if(editlt->def)
+ MEM_freeN(editlt->def);
+ if(editlt->dvert)
+ free_dverts(editlt->dvert, editlt->pntsu*editlt->pntsv*editlt->pntsw);
+
+ MEM_freeN(editlt);
MEM_freeN(lt->editlatt);
+
lt->editlatt= NULL;
}
}
@@ -76,47 +82,51 @@ void make_editLatt(Object *obedit)
{
Lattice *lt= obedit->data;
KeyBlock *actkey;
-
+
free_editLatt(obedit);
-
+
lt= obedit->data;
actkey= ob_get_keyblock(obedit);
if(actkey)
key_to_latt(actkey, lt);
- lt->editlatt= MEM_dupallocN(lt);
- lt->editlatt->def= MEM_dupallocN(lt->def);
-
+ lt->editlatt= MEM_callocN(sizeof(EditLatt), "editlatt");
+ lt->editlatt->latt= MEM_dupallocN(lt);
+ lt->editlatt->latt->def= MEM_dupallocN(lt->def);
+
if(lt->dvert) {
int tot= lt->pntsu*lt->pntsv*lt->pntsw;
- lt->editlatt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
- copy_dverts(lt->editlatt->dvert, lt->dvert, tot);
+ lt->editlatt->latt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
+ copy_dverts(lt->editlatt->latt->dvert, lt->dvert, tot);
}
+
+ if(lt->key) lt->editlatt->shapenr= obedit->shapenr;
}
void load_editLatt(Object *obedit)
{
- Lattice *lt;
+ Lattice *lt, *editlt;
KeyBlock *actkey;
BPoint *bp;
float *fp;
int tot;
-
+
lt= obedit->data;
-
- actkey= ob_get_keyblock(obedit);
+ editlt= lt->editlatt->latt;
+
+ if(lt->editlatt->shapenr) {
+ actkey= BLI_findlink(&lt->key->block, lt->editlatt->shapenr-1);
- if(actkey) {
/* active key: vertices */
- tot= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ tot= editlt->pntsu*editlt->pntsv*editlt->pntsw;
if(actkey->data) MEM_freeN(actkey->data);
fp=actkey->data= MEM_callocN(lt->key->elemsize*tot, "actkey->data");
actkey->totelem= tot;
-
- bp= lt->editlatt->def;
+
+ bp= editlt->def;
while(tot--) {
VECCOPY(fp, bp->vec);
fp+= 3;
@@ -125,30 +135,30 @@ void load_editLatt(Object *obedit)
}
else {
MEM_freeN(lt->def);
-
- lt->def= MEM_dupallocN(lt->editlatt->def);
- lt->flag= lt->editlatt->flag;
+ lt->def= MEM_dupallocN(editlt->def);
- lt->pntsu= lt->editlatt->pntsu;
- lt->pntsv= lt->editlatt->pntsv;
- lt->pntsw= lt->editlatt->pntsw;
+ lt->flag= editlt->flag;
+
+ lt->pntsu= editlt->pntsu;
+ lt->pntsv= editlt->pntsv;
+ lt->pntsw= editlt->pntsw;
- lt->typeu= lt->editlatt->typeu;
- lt->typev= lt->editlatt->typev;
- lt->typew= lt->editlatt->typew;
+ lt->typeu= editlt->typeu;
+ lt->typev= editlt->typev;
+ lt->typew= editlt->typew;
}
-
+
if(lt->dvert) {
free_dverts(lt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
lt->dvert= NULL;
}
-
- if(lt->editlatt->dvert) {
+
+ if(editlt->dvert) {
int tot= lt->pntsu*lt->pntsv*lt->pntsw;
-
+
lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
- copy_dverts(lt->dvert, lt->editlatt->dvert, tot);
+ copy_dverts(lt->dvert, editlt->dvert, tot);
}
}
@@ -160,9 +170,9 @@ void ED_setflagsLatt(Object *obedit, int flag)
BPoint *bp;
int a;
- bp= lt->editlatt->def;
+ bp= lt->editlatt->latt->def;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
while(a--) {
if(bp->hide==0) {
@@ -183,8 +193,8 @@ int select_all_exec(bContext *C, wmOperator *op)
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
- bp= lt->editlatt->def;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ bp= lt->editlatt->latt->def;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
while(a--) {
if(bp->hide==0) {
@@ -205,8 +215,8 @@ int select_all_exec(bContext *C, wmOperator *op)
ED_setflagsLatt(obedit, 0);
break;
case SEL_INVERT:
- bp= lt->editlatt->def;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ bp= lt->editlatt->latt->def;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
while(a--) {
if(bp->hide==0) {
@@ -256,7 +266,7 @@ int make_regular_exec(bContext *C, wmOperator *op)
if(ob) {
lt= ob->data;
- resizelattice(lt->editlatt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
+ resizelattice(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
else {
ob= CTX_data_active_object(C);
@@ -354,21 +364,21 @@ typedef struct UndoLattice {
static void undoLatt_to_editLatt(void *data, void *edata)
{
UndoLattice *ult= (UndoLattice*)data;
- Lattice *editlatt= (Lattice *)edata;
- int a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
+ EditLatt *editlatt= (EditLatt *)edata;
+ int a= editlatt->latt->pntsu*editlatt->latt->pntsv*editlatt->latt->pntsw;
- memcpy(editlatt->def, ult->def, a*sizeof(BPoint));
+ memcpy(editlatt->latt->def, ult->def, a*sizeof(BPoint));
}
static void *editLatt_to_undoLatt(void *edata)
{
UndoLattice *ult= MEM_callocN(sizeof(UndoLattice), "UndoLattice");
- Lattice *editlatt= (Lattice *)edata;
+ EditLatt *editlatt= (EditLatt *)edata;
- ult->def= MEM_dupallocN(editlatt->def);
- ult->pntsu= editlatt->pntsu;
- ult->pntsv= editlatt->pntsv;
- ult->pntsw= editlatt->pntsw;
+ ult->def= MEM_dupallocN(editlatt->latt->def);
+ ult->pntsu= editlatt->latt->pntsu;
+ ult->pntsv= editlatt->latt->pntsv;
+ ult->pntsw= editlatt->latt->pntsw;
return ult;
}
@@ -384,11 +394,11 @@ static void free_undoLatt(void *data)
static int validate_undoLatt(void *data, void *edata)
{
UndoLattice *ult= (UndoLattice*)data;
- Lattice *editlatt= (Lattice *)edata;
+ EditLatt *editlatt= (EditLatt *)edata;
- return (ult->pntsu == editlatt->pntsu &&
- ult->pntsv == editlatt->pntsv &&
- ult->pntsw == editlatt->pntsw);
+ return (ult->pntsu == editlatt->latt->pntsu &&
+ ult->pntsv == editlatt->latt->pntsv &&
+ ult->pntsw == editlatt->latt->pntsw);
}
static void *get_editlatt(bContext *C)
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 23bcf5309c5..6e9244e39ca 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -172,8 +172,8 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
else if(obedit->type==OB_LATTICE) {
Lattice *lt= obedit->data;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
- bp= lt->editlatt->def;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
+ bp= lt->editlatt->latt->def;
while(a--) {
if(bp->f1 & SELECT) {
if(v1==0) v1= nr;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 86f0c5fa874..5cdabcab41a 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -73,7 +73,7 @@ static Lattice *vgroup_edit_lattice(Object *ob)
{
if(ob->type==OB_LATTICE) {
Lattice *lt= ob->data;
- return (lt->editlatt)? lt->editlatt: lt;
+ return (lt->editlatt)? lt->editlatt->latt: lt;
}
return NULL;
@@ -169,7 +169,7 @@ int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_tot)
int i=0;
Lattice *lt= (Lattice *)id;
- lt= (lt->editlatt)? lt->editlatt: lt;
+ lt= (lt->editlatt)? lt->editlatt->latt: lt;
*dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
*dvert_arr= MEM_mallocN(sizeof(void*)*(*dvert_tot), "vgroup parray from me");
@@ -203,7 +203,7 @@ int ED_vgroup_give_array(ID *id, MDeformVert **dvert_arr, int *dvert_tot)
case ID_LT:
{
Lattice *lt= (Lattice *)id;
- lt= (lt->editlatt)? lt->editlatt: lt;
+ lt= (lt->editlatt)? lt->editlatt->latt: lt;
*dvert_arr= lt->dvert;
*dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
return TRUE;
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 693cac01f07..0789114c054 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -225,7 +225,7 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
else if(obedit->type==OB_LATTICE) {
/* Lattice Edit */
Lattice *lt= obedit->data;
- Lattice *editlatt= lt->editlatt;
+ Lattice *editlatt= lt->editlatt->latt;
BPoint *bp;
int a;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index d8c4a38e2aa..e23276cecad 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1357,10 +1357,10 @@ void lattice_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BPo
{
Object *obedit= vc->obedit;
Lattice *lt= obedit->data;
- BPoint *bp = lt->editlatt->def;
+ BPoint *bp = lt->editlatt->latt->def;
DispList *dl = find_displist(&obedit->disp, DL_VERTS);
float *co = dl?dl->verts:NULL;
- int i, N = lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ int i, N = lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
short s[2] = {IS_CLIPPED, 0};
ED_view3d_local_clipping(vc->rv3d, obedit->obmat); /* for local clipping lookups */
@@ -1408,7 +1408,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
dl= find_displist(&ob->disp, DL_VERTS);
if(is_edit) {
- lt= lt->editlatt;
+ lt= lt->editlatt->latt;
cpack(0x004000);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 5f3565c1088..e6c8ff2c268 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -255,8 +255,8 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
BPoint *bp;
int a;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
- bp= lt->editlatt->def;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
+ bp= lt->editlatt->latt->def;
while(a--) {
if(bp->f1 & SELECT) {
add_v3_v3(median, bp->vec);
@@ -457,8 +457,8 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
BPoint *bp;
int a;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
- bp= lt->editlatt->def;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
+ bp= lt->editlatt->latt->def;
while(a--) {
if(bp->f1 & SELECT) {
add_v3_v3(bp->vec, median);
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 35c4d10cb94..a4e893a6181 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -145,8 +145,8 @@ static void special_transvert_update(Scene *scene, Object *obedit)
else if(obedit->type==OB_LATTICE) {
Lattice *lt= obedit->data;
- if(lt->editlatt->flag & LT_OUTSIDE)
- outside_lattice(lt->editlatt);
+ if(lt->editlatt->latt->flag & LT_OUTSIDE)
+ outside_lattice(lt->editlatt->latt);
}
}
}
@@ -372,9 +372,9 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
else if(obedit->type==OB_LATTICE) {
Lattice *lt= obedit->data;
- bp= lt->editlatt->def;
+ bp= lt->editlatt->latt->def;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
tv=transvmain= MEM_callocN(a*sizeof(TransVert), "maketransverts curve");
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index e40c15de25d..a82037ead11 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1532,7 +1532,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
static void createTransLatticeVerts(bContext *C, TransInfo *t)
{
- Lattice *latt = ((Lattice*)t->obedit->data)->editlatt;
+ Lattice *latt = ((Lattice*)t->obedit->data)->editlatt->latt;
TransData *td = NULL;
BPoint *bp;
float mtx[3][3], smtx[3][3];
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 74f4b5cb52f..56a4eb846c0 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -659,7 +659,7 @@ void recalcData(TransInfo *t)
Lattice *la= t->obedit->data;
DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
- if(la->editlatt->flag & LT_OUTSIDE) outside_lattice(la->editlatt);
+ if(la->editlatt->latt->flag & LT_OUTSIDE) outside_lattice(la->editlatt->latt);
}
else if (t->obedit->type == OB_MESH) {
EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh;
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index e6def04130c..27c3f056b9b 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -379,9 +379,9 @@ int calc_manipulator_stats(const bContext *C)
BPoint *bp;
Lattice *lt= obedit->data;
- bp= lt->editlatt->def;
+ bp= lt->editlatt->latt->def;
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
while(a--) {
if(bp->f1 & SELECT) {
calc_tw_center(scene, bp->vec);