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
path: root/source
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-03-25 19:53:07 +0300
committerLukas Toenne <lukas.toenne@googlemail.com>2011-03-25 19:53:07 +0300
commitfb2fd884637f912a56302d331f4514ddd7b18374 (patch)
tree70fe9fcd7e72375d46aa630e811aeada7d6a711f /source
parent62beafdd19660f67d06e9c8f6e5964b3eb8c21a1 (diff)
Moved temporary drag operator link drawing from node tree to node space function. Otherwise these links are redrawn for each node group.
Changed selection flag used for the selected_nodes context property from SELECT to NODE_SELECT. These are just incidentally the same, but NODE_SELECT should be used for nodes.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_node/node_draw.c18
-rw-r--r--source/blender/editors/space_node/space_node.c2
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 920e670573d..0c9f12966ef 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -995,7 +995,6 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode,
{
bNode *node;
bNodeLink *link;
- bNodeLinkDrag *nldrag;
int a;
if(ntree==NULL) return; /* groups... */
@@ -1030,14 +1029,6 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode,
node_draw_basis(C, ar, snode, ntree, node);
}
}
-
- /* temporary links */
- glEnable(GL_BLEND);
- glEnable(GL_LINE_SMOOTH);
- for(nldrag= snode->linkdrag.first; nldrag; nldrag= nldrag->next)
- node_draw_link(&ar->v2d, snode, nldrag->link);
- glDisable(GL_LINE_SMOOTH);
- glDisable(GL_BLEND);
}
static void group_verify_cb(bContext *UNUSED(C), void *UNUSED(snode_v), void *ngroup_v)
@@ -1213,6 +1204,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
SpaceNode *snode= CTX_wm_space_node(C);
Scene *scene= CTX_data_scene(C);
int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
+ bNodeLinkDrag *nldrag;
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
@@ -1268,6 +1260,14 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
}
}
+ /* temporary links */
+ glEnable(GL_BLEND);
+ glEnable(GL_LINE_SMOOTH);
+ for(nldrag= snode->linkdrag.first; nldrag; nldrag= nldrag->next)
+ node_draw_link(&ar->v2d, snode, nldrag->link);
+ glDisable(GL_LINE_SMOOTH);
+ glDisable(GL_BLEND);
+
/* draw grease-pencil ('canvas' strokes) */
if (/*(snode->flag & SNODE_DISPGP) &&*/ (snode->nodetree))
draw_gpencil_view2d((bContext*)C, 1);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 5d9cb183e60..c0e9e8e22e1 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -431,7 +431,7 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
bNode *node;
for(next_node(snode->edittree); (node=next_node(NULL));) {
- if(node->flag & SELECT) {
+ if(node->flag & NODE_SELECT) {
CTX_data_list_add(result, &snode->edittree->id, &RNA_Node, node);
}
}