Is node collection ordered? #82350
Labels
No Label
Meta
Good First Issue
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Eevee & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds, Tests & Devices
Module
Python API
Module
Rendering & Cycles
Module
Sculpt, Paint & Texture
Module
User Interface
Module
VFX & Video
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Information from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-manual#82350
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I actually have found that it is and it represents selection order. Probably it is worth mentioning in the documentation if it is going to be persistent between Blender releases?
https://docs.blender.org/api/current/bpy.types.Nodes.html
Added subscriber: @randum
Added subscriber: @JacquesLucke
Changed status from 'Needs Triage' to: 'Archived'
Right, the nodes are ordered so that last selected node is at the end. This way it is drawn last, i.e. at the top. I don't really want to document this behavior though. I don't want anyone to rely on this order. See
ED_node_sort
for more details.Well I was going to rely on it. I have the problem of determining of active output node of a group tree. There is
tree.active_output
attribute which looks doing nothing. It always (almost) points to last node in node collection (my guess). I think its purpose is to be corrected manually so it could point to any you like.With assuming that nodes collection is order this task becomes simple I just have to find last output node in nodes collection. Otherwise I was thinking about adding
draw handler
to node tree to track nodes selection but I would like to avoid this solution if possible. Are you going to change this behavior soon?You might be able to use the
is_active_output
property of output nodes. And yes, I think the active node is set by simply selecting the node. Since this node is also the active node, it will be moved to the back of the nodes list. So you can kinda depend on this fact for now, but I won't promise nor document that this won't change in a future release.The
tree.active_output
selects the active output socket I think, not the active output node.