-
- Downloads
Fix: link_viewer() not updating viewer node properly
How to reproduce: - Open blend file in original PR - `ctrl + left click` on render layers node - Expected behavior: Viewer connected to "image" socket gets activated. - Actual behavior: Viewer 2 is still active and there are two active viewers in the node tree. The reason why `NODE_OT_link_viewer()` worked before without ensuring only one active viewer exists in the node tree is because if it found a linked viewer, it would link it without explicitly activating it (i.e. without setting `viewer_node->flag |= NODE_DO_OUTPUT`), assuming no other active viewers can exist in that case. But in principle, viewer nodes can also be activated using `node_tree.nodes.active = viewer_node` as well, which is now more likely to happen after b51c560f. One could argue that it makes more sense to activate the viewer node without shortcut by default when `link_viewer()` is called, instead of activating the first viewer (in this case with shortcut `1`). However, this patch aims to keep the change minimal. Also, the socket that gets previewed woul be the same which is probably what users want anyways. Pull Request: https://projects.blender.org/blender/blender/pulls/135966
Loading
Please register or sign in to comment