Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg <gregzzmail@gmail.com>2016-08-09 12:44:34 +0300
committerGreg <gregzzmail@gmail.com>2016-08-09 12:44:34 +0300
commit8d8779afa3a96e66a7c9079272a2c0127b9147e1 (patch)
treed94be6755b11829ff0621466fe5863b541c9190c /node_wrangler.py
parent9bb36cdc52284aba5f056716aebdb373330ec9dc (diff)
Node Wrangler: (by @gandalf3 ) Improve volume workflow by keeping viewer outputs the same if it's already connected
Diffstat (limited to 'node_wrangler.py')
-rw-r--r--node_wrangler.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/node_wrangler.py b/node_wrangler.py
index d289bc10..dd26d91f 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