[Bf-extensions-cvs] [8d8779a] master: Node Wrangler: (by @gandalf3 ) Improve volume workflow by keeping viewer outputs the same if it's already connected
Greg
noreply at git.blender.org
Tue Aug 9 11:47:42 CEST 2016
Commit: 8d8779afa3a96e66a7c9079272a2c0127b9147e1
Author: Greg
Date: Tue Aug 9 11:44:34 2016 +0200
Branches: master
https://developer.blender.org/rBA8d8779afa3a96e66a7c9079272a2c0127b9147e1
Node Wrangler: (by @gandalf3 ) Improve volume workflow by keeping viewer outputs the same if it's already connected
===================================================================
M node_wrangler.py
===================================================================
diff --git a/node_wrangler.py b/node_wrangler.py
index d289bc1..dd26d91 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -1619,7 +1619,13 @@ class NWEmissionViewer(Operator, NWBase):
else:
emission = emission_placeholder
make_links.append((active.outputs[out_i], emission.inputs[0]))
- make_links.append((emission.outputs[0], materialout.inputs[0]))
+
+ # If Viewer is connected to output by user, don't change those connections (patch by gandalf3)
+ if emission.outputs[0].links.__len__() > 0:
+ if not emission.outputs[0].links[0].to_node == materialout:
+ make_links.append((emission.outputs[0], materialout.inputs[0]))
+ else:
+ make_links.append((emission.outputs[0], materialout.inputs[0]))
# Set brightness of viewer to compensate for Film and CM exposure
intensity = 1/context.scene.cycles.film_exposure # Film exposure is a multiplier
More information about the Bf-extensions-cvs
mailing list