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:
authorTon Roosendaal <ton@blender.org>2013-09-05 17:03:03 +0400
committerTon Roosendaal <ton@blender.org>2013-09-05 17:03:03 +0400
commitdc8832ac92b3640f7dcb784086417da925c9e721 (patch)
tree439fc0393e8b2bbfefdb840e64264739df653297 /source/blender/editors/space_node/node_intern.h
parent69b68ed867407538a9b231cabf3481cb1404b37f (diff)
Bugfix #35920
Adding a new node in Node Editor failed for "High DPI" (Only Mac retina now). - Py script for adding nodes was doing dpi magic, which it shouldn't. It has been replaced with a (temporary) API call to set the correct cursor location. (Thanks to Lukas T for helping here) - The SpaceNode->cursor[2] property now is *only* storing the coordinate in "adding new node space". Use of this has been removed from the code where possible, with as only exception the code to draw noodles while adding them. Special coder note: Nodes should respect the DPI value, and draw larger with larger buttons if you increase this size. The hack here is that this can only work nice if also the node positions are scaled accordingly. A better fix could be to check on scaling the node view itself for it. That then would also remove this Python API call that was added in this commit. However, that again might fight with how buttons layout code works now... needs some careful checking.
Diffstat (limited to 'source/blender/editors/space_node/node_intern.h')
-rw-r--r--source/blender/editors/space_node/node_intern.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 6ad0675eadd..9b7b00fba00 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -84,7 +84,7 @@ void node_draw_nodetree(const struct bContext *C, struct ARegion *ar, struct Spa
struct bNodeTree *ntree, bNodeInstanceKey parent_key);
void drawnodespace(const bContext *C, ARegion *ar);
-void node_set_cursor(struct wmWindow *win, struct SpaceNode *snode);
+void node_set_cursor(struct wmWindow *win, struct SpaceNode *snode, float cursor[2]);
/* DPI scaled coords */
void node_to_view(struct bNode *node, float x, float y, float *rx, float *ry);
void node_from_view(struct bNode *node, float x, float y, float *rx, float *ry);
@@ -183,7 +183,7 @@ int composite_node_editable(struct bContext *C);
int node_has_hidden_sockets(bNode *node);
void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set);
int node_render_changed_exec(bContext *, struct wmOperator *);
-int node_find_indicated_socket(struct SpaceNode *snode, struct bNode **nodep, struct bNodeSocket **sockp, int in_out);
+int node_find_indicated_socket(struct SpaceNode *snode, struct bNode **nodep, struct bNodeSocket **sockp, float cursor[2], int in_out);
void NODE_OT_duplicate(struct wmOperatorType *ot);
void NODE_OT_delete(struct wmOperatorType *ot);