Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_ops.c
| Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | EnumPropertyItem rna_enum_transform_mode_types[] = | ||||
| {TFM_ALIGN, "ALIGN", 0, "Align", ""}, | {TFM_ALIGN, "ALIGN", 0, "Align", ""}, | ||||
| {TFM_EDGE_SLIDE, "EDGESLIDE", 0, "Edge Slide", ""}, | {TFM_EDGE_SLIDE, "EDGESLIDE", 0, "Edge Slide", ""}, | ||||
| {TFM_SEQ_SLIDE, "SEQSLIDE", 0, "Sequence Slide", ""}, | {TFM_SEQ_SLIDE, "SEQSLIDE", 0, "Sequence Slide", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static int select_orientation_exec(bContext *C, wmOperator *op) | static int select_orientation_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| View3D *v3d = CTX_wm_view3d(C); | |||||
| int orientation = RNA_enum_get(op->ptr, "orientation"); | int orientation = RNA_enum_get(op->ptr, "orientation"); | ||||
| BIF_selectTransformOrientationValue(C, orientation); | BIF_selectTransformOrientationValue(CTX_wm_workspace(C), v3d, orientation); | ||||
| WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); | WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static int select_orientation_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) | static int select_orientation_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| uiPopupMenu *pup; | uiPopupMenu *pup; | ||||
| uiLayout *layout; | uiLayout *layout; | ||||
| ▲ Show 20 Lines • Show All 994 Lines • Show Last 20 Lines | |||||