Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_view.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| ot->idname = "NODE_OT_view_all"; | ot->idname = "NODE_OT_view_all"; | ||||
| ot->description = "Resize view so you can see all nodes"; | ot->description = "Resize view so you can see all nodes"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = node_view_all_exec; | ot->exec = node_view_all_exec; | ||||
| ot->poll = ED_operator_node_active; | ot->poll = ED_operator_node_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| static int node_view_selected_exec(bContext *C, wmOperator *op) | static int node_view_selected_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| SpaceNode *snode = CTX_wm_space_node(C); | SpaceNode *snode = CTX_wm_space_node(C); | ||||
| const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); | const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); | ||||
| Show All 12 Lines | |||||
| ot->idname = "NODE_OT_view_selected"; | ot->idname = "NODE_OT_view_selected"; | ||||
| ot->description = "Resize view so you can see selected nodes"; | ot->description = "Resize view so you can see selected nodes"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = node_view_selected_exec; | ot->exec = node_view_selected_exec; | ||||
| ot->poll = ED_operator_node_active; | ot->poll = ED_operator_node_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| /* **************** Background Image Operators ************** */ | /* **************** Background Image Operators ************** */ | ||||
| typedef struct NodeViewMove { | typedef struct NodeViewMove { | ||||
| int mvalo[2]; | int mvalo[2]; | ||||
| int xmin, ymin, xmax, ymax; | int xmin, ymin, xmax, ymax; | ||||
| } NodeViewMove; | } NodeViewMove; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||