Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_object_texspace.c
| Show All 23 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Texture Space Transform Creation | /** \name Texture Space Transform Creation | ||||
| * | * | ||||
| * Instead of transforming the selection, move the 2D/3D cursor. | * Instead of transforming the selection, move the 2D/3D cursor. | ||||
| * | * | ||||
| * \{ */ | * \{ */ | ||||
| void createTransTexspace(TransInfo *t) | static void createTransTexspace(bContext *UNUSED(C), TransInfo *t) | ||||
| { | { | ||||
| ViewLayer *view_layer = t->view_layer; | ViewLayer *view_layer = t->view_layer; | ||||
| TransData *td; | TransData *td; | ||||
| Object *ob; | Object *ob; | ||||
| ID *id; | ID *id; | ||||
| char *texflag; | char *texflag; | ||||
| ob = OBACT(view_layer); | ob = OBACT(view_layer); | ||||
| Show All 40 Lines | |||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Recalc Data object | /** \name Recalc Data object | ||||
| * \{ */ | * \{ */ | ||||
| void recalcData_texspace(TransInfo *t) | static void recalcData_texspace(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) { | ||||
| TransData *td = tc->data; | TransData *td = tc->data; | ||||
| for (int i = 0; i < tc->data_len; i++, td++) { | for (int i = 0; i < tc->data_len; i++, td++) { | ||||
| if (td->flag & TD_SKIP) { | if (td->flag & TD_SKIP) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| DEG_id_tag_update(&td->ob->id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&td->ob->id, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| TransConvertTypeInfo TransConvertType_ObjectTexSpace = { | |||||
| /* flags */ 0, | |||||
| /* createTransData */ createTransTexspace, | |||||
| /* recalcData */ recalcData_texspace, | |||||
| /* special_aftertrans_update */ NULL, | |||||
| }; | |||||