Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-08-08 21:37:02 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-08-08 21:37:02 +0400
commit543cee14ca9a6b89a1b26ccbfda1d58743db71af (patch)
tree0cac00be9012018f670e11747b3cb7af04f46bf1 /source/blender/editors/space_node/node_add.c
parentde131177b0ccfa9c65b9edca97f6349ebc3b6b07 (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_add.c')
-rw-r--r--source/blender/editors/space_node/node_add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index 221a0b14698..7d007d024ab 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -273,7 +273,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(C);
- 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]);
if (!node) {
BKE_report(op->reports, RPT_WARNING, "Could not add an image node");
@@ -296,7 +296,7 @@ static int node_add_file_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* convert mouse coordinates to v2d space */
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
- &snode->mx, &snode->my);
+ &snode->cursor[0], &snode->cursor[1]);
if (RNA_struct_property_is_set(op->ptr, "filepath") || RNA_struct_property_is_set(op->ptr, "name"))
return node_add_file_exec(C, op);