Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_mball.c
| Show All 16 Lines | |||||
| #include "transform_snap.h" | #include "transform_snap.h" | ||||
| #include "transform_convert.h" | #include "transform_convert.h" | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Meta Elements Transform Creation | /** \name Meta Elements Transform Creation | ||||
| * \{ */ | * \{ */ | ||||
| void createTransMBallVerts(TransInfo *t) | static void createTransMBallVerts(bContext *UNUSED(C), TransInfo *t) | ||||
| { | { | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| MetaBall *mb = (MetaBall *)tc->obedit->data; | MetaBall *mb = (MetaBall *)tc->obedit->data; | ||||
| MetaElem *ml; | MetaElem *ml; | ||||
| TransData *td; | TransData *td; | ||||
| TransDataExtension *tx; | TransDataExtension *tx; | ||||
| float mtx[3][3], smtx[3][3]; | float mtx[3][3], smtx[3][3]; | ||||
| int count = 0, countsel = 0; | int count = 0, countsel = 0; | ||||
| ▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Recalc Meta Ball | /** \name Recalc Meta Ball | ||||
| * \{ */ | * \{ */ | ||||
| void recalcData_mball(TransInfo *t) | static void recalcData_mball(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) { | ||||
| if (tc->data_len) { | if (tc->data_len) { | ||||
| DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY); | DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| TransConvertTypeInfo TransConvertType_MBall = { | |||||
| /* flags */ (T_EDIT | T_POINTS), | |||||
| /* createTransData */ createTransMBallVerts, | |||||
| /* recalcData */ recalcData_mball, | |||||
| /* special_aftertrans_update */ NULL, | |||||
| }; | |||||