diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-08-08 21:37:02 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-08-08 21:37:02 +0400 |
commit | 543cee14ca9a6b89a1b26ccbfda1d58743db71af (patch) | |
tree | 0cac00be9012018f670e11747b3cb7af04f46bf1 /source/blender/editors/space_node/node_header.c | |
parent | de131177b0ccfa9c65b9edca97f6349ebc3b6b07 (diff) |
Renamed the mx/my coordinates in SpaceNode to more descriptive 'cursor'. This follows the naming in the View3D space, since this vector is used for essentially the same purpose (adding nodes at a specific location), although not used for any transform origin and not displayed in the editor.
Note: While renaming DNA properties is usually dangerous and can break files, in this case it is possible because the mx/my values are only used at runtime.
Diffstat (limited to 'source/blender/editors/space_node/node_header.c')
-rw-r--r-- | source/blender/editors/space_node/node_header.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index b6bf8d77732..f461174d74f 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -74,7 +74,7 @@ static void do_node_add(bContext *C, bNodeTemplate *ntemp) int y = win->eventstate->y - ar->winrct.ymin; if (y < 60) y += 60; - UI_view2d_region_to_view(&ar->v2d, x, y, &snode->mx, &snode->my); + UI_view2d_region_to_view(&ar->v2d, x, y, &snode->cursor[0], &snode->cursor[1]); } } @@ -84,7 +84,7 @@ static void do_node_add(bContext *C, bNodeTemplate *ntemp) else node->flag &= ~NODE_TEST; } - /* node= */ node_add_node(snode, bmain, scene, ntemp, snode->mx, snode->my); + /* node= */ node_add_node(snode, bmain, scene, ntemp, snode->cursor[0], snode->cursor[1]); /* select previous selection before autoconnect */ for (node = snode->edittree->nodes.first; node; node = node->next) { |