Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_edit.c
| Show First 20 Lines • Show All 874 Lines • ▼ Show 20 Lines | |||||
| static void node_resize_init( | static void node_resize_init( | ||||
| bContext *C, wmOperator *op, const wmEvent *UNUSED(event), bNode *node, int dir) | bContext *C, wmOperator *op, const wmEvent *UNUSED(event), bNode *node, int dir) | ||||
| { | { | ||||
| SpaceNode *snode = CTX_wm_space_node(C); | SpaceNode *snode = CTX_wm_space_node(C); | ||||
| NodeSizeWidget *nsw = MEM_callocN(sizeof(NodeSizeWidget), "size widget op data"); | NodeSizeWidget *nsw = MEM_callocN(sizeof(NodeSizeWidget), "size widget op data"); | ||||
| op->customdata = nsw; | op->customdata = nsw; | ||||
| nsw->mxstart = snode->cursor[0] * UI_DPI_FAC; | nsw->mxstart = snode->runtime->cursor[0] * UI_DPI_FAC; | ||||
| nsw->mystart = snode->cursor[1] * UI_DPI_FAC; | nsw->mystart = snode->runtime->cursor[1] * UI_DPI_FAC; | ||||
| /* store old */ | /* store old */ | ||||
| nsw->oldlocx = node->locx; | nsw->oldlocx = node->locx; | ||||
| nsw->oldlocy = node->locy; | nsw->oldlocy = node->locy; | ||||
| nsw->oldoffsetx = node->offsetx; | nsw->oldoffsetx = node->offsetx; | ||||
| nsw->oldoffsety = node->offsety; | nsw->oldoffsety = node->offsety; | ||||
| nsw->oldwidth = node->width; | nsw->oldwidth = node->width; | ||||
| nsw->oldheight = node->height; | nsw->oldheight = node->height; | ||||
| ▲ Show 20 Lines • Show All 1,876 Lines • Show Last 20 Lines | |||||