Page MenuHome

Add Replace Node operator
Needs ReviewPublic

Authored by Sergey Sharybin (sergey) on Apr 7 2016, 6:24 PM.

Details

Summary

The idea of this operator is to be able quickly replace one node with
another one without worrying about connections. For example, it's now
really easy to replace Diffuse BSDF with Hair one, or replace Render
Layer node with Image.

Nodes compatibility checks are not really comprehensive yet and could
be improved further (so one can replace, say, Value node with Texture).
Mapping of sockets for relinking could also be improved.

The shortcut is Alt-R.

But patch is ready to be tested by artists i think.

Diff Detail

Repository
rB Blender
Branch
node_replace

Event Timeline

Improvements to nodes re-mapping, plus some bug fixes

Need to switch to another tasks atm, but planned to do:

  • Allow changing node type (Input to Texture and so)
  • More friendly interface to change BSDF type or to go Mix/Add nodes

There is already a simliar function in the "Node Efficiency Tools". But the shortcut there is Shift+S.
And the Alt+R shortcut is already in use: reload images in node tree (Windows)
https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Nodes/Nodes_Efficiency_Tools

P.S. We need a native Cycles Viewer Node (The above addon has it, sort of...)

Edit: Ups, the Alt+R = Reload Images is also from the Addon.

@Michael P. (forest-house), there are indeed addons for that, but such functionality is something what should become more of a core feature IMO. Surely we can enable some addon by default, but all those node-related addons i'm aware of are quite huge for that. Having smaller subset would improve usability without exposing too much buttons to artists.

@Sergey Sharybin (sergey). You are right. I support you 100% on this. I thik the Swap Node functionality should be a core feature, not an add-on feature.
The previous post was only meant to inform, nothing more.
I think the add-on has some more concepts/ideas, like the "Viewer Node" for Cycles, which could/should be added to the core node functionality and
be always available in Blender.

I build blender and applied this patch to test it, and here is my feedback from artist view:

  1. General it is a good idea to have this functionality in Blender without an add-on
  2. But at the moment it is too restricted, because I can only swap one node with another "class" node, i.e. from the input "class"
  3. It is even very restrictive, because in the same class the type also must match, i.e. swap color input against image input and the connection gets lost. You have to manually connect the node again. Thats not how it works in the real work flow. Input / Output types get mixed all the time. And this is desired.
  4. It would be better if I could swap any node with any other node (like in "Node Efficiency Tools"). Yes, it doesn't make sense sometimes, but then manually correct this, takes less time than the implemented work flow now.
  5. The short cut should be the same like in the "Node Efficiency Tools", which is Shift+S. So user who worked with the add-on adapt it more quickly. And it is next to add node.