Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_curve.c
| Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | if ((flag != ((1 << 0) | (1 << 1) | (1 << 2))) && (flag & (1 << 1))) { | ||||
| if (ELEM(bezt->h1, HD_AUTO, HD_ALIGN) && ELEM(bezt->h2, HD_AUTO, HD_ALIGN)) { | if (ELEM(bezt->h1, HD_AUTO, HD_ALIGN) && ELEM(bezt->h2, HD_AUTO, HD_ALIGN)) { | ||||
| flag = (1 << 0) | (1 << 1) | (1 << 2); | flag = (1 << 0) | (1 << 1) | (1 << 2); | ||||
| } | } | ||||
| } | } | ||||
| return flag; | return flag; | ||||
| } | } | ||||
| void createTransCurveVerts(TransInfo *t) | static void createTransCurveVerts(bContext *UNUSED(C), TransInfo *t) | ||||
| { | { | ||||
| #define SEL_F1 (1 << 0) | #define SEL_F1 (1 << 0) | ||||
| #define SEL_F2 (1 << 1) | #define SEL_F2 (1 << 1) | ||||
| #define SEL_F3 (1 << 2) | #define SEL_F3 (1 << 2) | ||||
| t->data_len_all = 0; | t->data_len_all = 0; | ||||
| ▲ Show 20 Lines • Show All 336 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (Nurb *, nu, nurbs) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #undef SEL_F1 | #undef SEL_F1 | ||||
| #undef SEL_F2 | #undef SEL_F2 | ||||
| #undef SEL_F3 | #undef SEL_F3 | ||||
| } | } | ||||
| void recalcData_curve(TransInfo *t) | static void recalcData_curve(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) { | ||||
| Curve *cu = tc->obedit->data; | Curve *cu = tc->obedit->data; | ||||
| ListBase *nurbs = BKE_curve_editNurbs_get(cu); | ListBase *nurbs = BKE_curve_editNurbs_get(cu); | ||||
| Show All 14 Lines | else { | ||||
| /* Normal updating. */ | /* Normal updating. */ | ||||
| BKE_curve_dimension_update(cu); | BKE_curve_dimension_update(cu); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| TransConvertTypeInfo TransConvertType_Curve = { | |||||
| /* flags */ (T_EDIT | T_POINTS), | |||||
| /* createTransData */ createTransCurveVerts, | |||||
| /* recalcData */ recalcData_curve, | |||||
| /* special_aftertrans_update */ NULL, | |||||
| }; | |||||