Adds the ability to "unview" the preview node by Ctrl+Shift clicking on empty space.
It assumes that rightmost shader node (excluding Viewer) is the "main" shader and connects it to the output directly (similar to how a user would do it), which works surprisingly well.
Details
- Reviewers
- None
Diff Detail
- Repository
- rBA Blender Add-ons
Event Timeline
This looks like it could be a nice addition! Thx already.
Sorry this has been lying around, could you rebase? (applying the patch fails for me atm...)
Rebased to a fresh version.
Also fixed an issue with frames and their relative offsets. Now using absolute node locations, just like they're displayed on the screen.
Not sure why the diff looks so weird, I only changed the top part in invoke and unindented the rest.
There was another commit in this area yesterday: 1bc96468a144 your patch probably needs another rebase, bad timing :/
Functionality wise i'm not sure if simply picking the rightmost shader is too much of an assumption, i imagine this would fail in some common cases (e.g. main shader is inside a group or main shader is not the most right shader). Maybe it would be possible to rather store the "main" shader node before deconnecting it and then reconnecting that node, however this would probably be more complicated.
I think the right-most shader that has a shader-type output socket would be good, since it'd be either shader node, group, or any other suitable custom node.
Ideally it'd also be good to add similar functionality to the compositor node tree too - connecting the rightmost node to the viewer node (but maybe not to the actual output node, not sure).