Page MenuHome

Nodes: Link to Output operator
AcceptedPublic

Authored by Dalai Felinto (dfelinto) on Oct 6 2022, 2:56 PM.

Details

Summary

A new operator to connect the active node to the output node.

Note: This does not cycle through the possible outputs of the active node, it just takes the best match and goes with it.

Diff Detail

Repository
rB Blender
Branch
connect-output (branched from master)
Build Status
Buildable 24153
Build 24153: arc lint + arc unit

Event Timeline

Dalai Felinto (dfelinto) requested review of this revision.Oct 6 2022, 2:56 PM
Dalai Felinto (dfelinto) created this revision.

Patch working for all node-tree types

Dalai Felinto (dfelinto) retitled this revision from Nodes: Link to Output operator (WIP) to Nodes: Link to Output operator.Oct 6 2022, 5:04 PM
Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)

Testing this, I was missing some of the features of the viewer node (linking multiple sockets on the same node mostly). I'll bet the cycling would come up again in the future.
Maybe it's still worth adding. The answer might be clearer if this had a more explicit use case presented in the patch description. As is, a workaround for performance issues with the viewer node is not super compelling honestly.

It might be nice to have a poll and poll message that checks for an active node. Otherwise I could see users being confused in that case.

source/blender/editors/space_node/node_relationships.cc
1342

fr -> from. There's no real reason to save two characters at the cost of readability, IMO

1360

Judging on error messages I've seen in the past, I think "There is" is superfluous, it could be removed.

1398

TODO comment can be removed?

Dalai Felinto (dfelinto) marked 3 inline comments as done.
  • From review: cleanups

    fr -> from remove TODO better error messages

I think it still makes sense to get more artist/user feedback about whether this solves the problems, but either way, the code looks fine now.

This revision is now accepted and ready to land.Oct 17 2022, 5:56 PM