Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_lattice.c
| Show All 19 Lines | |||||
| /* Own include. */ | /* Own include. */ | ||||
| #include "transform_convert.h" | #include "transform_convert.h" | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Curve/Surfaces Transform Creation | /** \name Curve/Surfaces Transform Creation | ||||
| * \{ */ | * \{ */ | ||||
| void createTransLatticeVerts(TransInfo *t) | static void createTransLatticeVerts(bContext *UNUSED(C), TransInfo *t) | ||||
| { | { | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| Lattice *latt = ((Lattice *)tc->obedit->data)->editlatt->latt; | Lattice *latt = ((Lattice *)tc->obedit->data)->editlatt->latt; | ||||
| TransData *td = NULL; | TransData *td = NULL; | ||||
| BPoint *bp; | BPoint *bp; | ||||
| float mtx[3][3], smtx[3][3]; | float mtx[3][3], smtx[3][3]; | ||||
| int a; | int a; | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | while (a--) { | ||||
| td++; | td++; | ||||
| } | } | ||||
| } | } | ||||
| bp++; | bp++; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void recalcData_lattice(TransInfo *t) | static void recalcData_lattice(TransInfo *t) | ||||
| { | { | ||||
| if (t->state != TRANS_CANCEL) { | if (t->state != TRANS_CANCEL) { | ||||
| applySnappingIndividual(t); | applySnappingIndividual(t); | ||||
| } | } | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| Lattice *la = tc->obedit->data; | Lattice *la = tc->obedit->data; | ||||
| DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY); | DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY); | ||||
| if (la->editlatt->latt->flag & LT_OUTSIDE) { | if (la->editlatt->latt->flag & LT_OUTSIDE) { | ||||
| outside_lattice(la->editlatt->latt); | outside_lattice(la->editlatt->latt); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| TransConvertTypeInfo TransConvertType_Lattice = { | |||||
| /* flags */ (T_EDIT | T_POINTS), | |||||
| /* createTransData */ createTransLatticeVerts, | |||||
| /* recalcData */ recalcData_lattice, | |||||
| /* special_aftertrans_update */ NULL, | |||||
| }; | |||||