Page MenuHome

Active Node is not changed when the user clicks a node UI element
Closed, ArchivedPublic

Description

System Information
Win7 x64

Blender Version
Broken: Blender 2.66 r55078
Worked: unknown

The active node is only changed when the user clicks the title or background of a node. It should at the very least be changed when the user clicks on an operator button.

Exact steps for others to reproduce the error

  1. Create a custom node tree
  2. Click an edit box or button within the node

In

, try clicking the "Add" button of the unselected node. The operator will run on the other (active) node.

Event Timeline

Tom Edwards (artfunkel) raised the priority of this task from to 90.
Tom Edwards (artfunkel) updated the task description. (Show Details)
Tom Edwards (artfunkel) edited a custom field.
Tom Edwards (artfunkel) added a project: Nodes.
Brecht Van Lommel (brecht) changed the task status from Unknown Status to Archived.Dec 8 2013, 9:51 PM

The operator should use context.node instead of context.active_node in this case, to get the node that the button is on.

I think this is working as intended, it could activate the node when you click a button on it but I'm not sure that's actually better, would not consider it a bug anyway.

Tom Edwards (artfunkel) changed the task status from Archived to Unknown Status.Dec 8 2013, 10:01 PM

context.node is the same as context.active_node. Sounds like that's the bug!

I tested changing context.active_node to context.node in your script, and it worked? They are different here.

Tom Edwards (artfunkel) changed the task status from Unknown Status to Archived.Dec 8 2013, 10:10 PM

Whoops, I was editing the poll function!