Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_mesh_edge.c
| Show All 17 Lines | |||||
| #include "transform.h" | #include "transform.h" | ||||
| #include "transform_convert.h" | #include "transform_convert.h" | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Edge (for crease) Transform Creation | /** \name Edge (for crease) Transform Creation | ||||
| * \{ */ | * \{ */ | ||||
| void createTransEdge(TransInfo *t) | static void createTransEdge(bContext *UNUSED(C), TransInfo *t) | ||||
| { | { | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| BMEditMesh *em = BKE_editmesh_from_object(tc->obedit); | BMEditMesh *em = BKE_editmesh_from_object(tc->obedit); | ||||
| TransData *td = NULL; | TransData *td = NULL; | ||||
| BMEdge *eed; | BMEdge *eed; | ||||
| BMIter iter; | BMIter iter; | ||||
| float mtx[3][3], smtx[3][3]; | float mtx[3][3], smtx[3][3]; | ||||
| ▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { | ||||
| td->ival = *fl_ptr; | td->ival = *fl_ptr; | ||||
| td++; | td++; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void recalcData_mesh_edge(TransInfo *t) | static void recalcData_mesh_edge(TransInfo *t) | ||||
| { | { | ||||
| FOREACH_TRANS_DATA_CONTAINER (t, tc) { | FOREACH_TRANS_DATA_CONTAINER (t, tc) { | ||||
| DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY); | DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| TransConvertTypeInfo TransConvertType_MeshEdge = { | |||||
| /* flags */ T_EDIT, | |||||
| /* createTransData */ createTransEdge, | |||||
| /* recalcData */ recalcData_mesh_edge, | |||||
| /* special_aftertrans_update */ special_aftertrans_update__mesh, | |||||
| }; | |||||