diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-11-20 07:19:57 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-11-20 07:19:57 +0300 |
commit | e6d382bd5353e526c21d3f3f021560fd58d07c41 (patch) | |
tree | 43d51f9c7b9df4c16b281a0a09510cbc35c4c6d1 /source/blender/editors/space_node/node_buttons.c | |
parent | 3d1e618864422cacfd73442f2847bbe68d96fada (diff) |
Node Editor: Various usability and code tidyups
* Fixed a nasty bug which meant that it was impossible to set an active node. Was caused by ntreeCopyTree() getting called when compo updates were done and clearing the active flags. The active flag clearing is only really needed for the "internal_select" case which is only used for duplicating selected nodes (from Shift-D duplicate).
* Recoded click-selection code. Was a mess of old code, bad exceptions from the old code half ported, duplicate operators, unnecessary flags/modes.
* Fixed bug #19927: compositing node groups can't be access via "tab" or ungrouped via "alt+g". Was probably related to the active group not being able to be set.
* Made resizing nodes work again. Again, this was due to the active node bug.
* Made adding a new group with Ctrl-G correctly update the views
Diffstat (limited to 'source/blender/editors/space_node/node_buttons.c')
-rw-r--r-- | source/blender/editors/space_node/node_buttons.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index 20650812d52..52d8fc48a1a 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -103,8 +103,8 @@ static int active_node_poll(const bContext *C, PanelType *pt) static void active_node_panel(const bContext *C, Panel *pa) { SpaceNode *snode= CTX_wm_space_node(C); - bNodeTree *ntree= (snode) ? snode->nodetree : NULL; // XXX what's up with edittree then? - bNode *node = (ntree) ? nodeGetActive(ntree) : NULL; + bNodeTree *ntree= (snode) ? snode->edittree : NULL; + bNode *node = (ntree) ? nodeGetActive(ntree) : NULL; // xxx... for editing group nodes uiLayout *layout= pa->layout; uiBlock *block; PointerRNA ptr; @@ -112,7 +112,10 @@ static void active_node_panel(const bContext *C, Panel *pa) /* verify pointers, and create RNA pointer for the node */ if ELEM(NULL, ntree, node) return; - RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); + //if (node->id) /* for group nodes */ + // RNA_pointer_create(node->id, &RNA_Node, node, &ptr); + //else + RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); /* set update callback */ // xxx is this really needed |