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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-12 13:31:30 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-12 13:31:59 +0300
commit8130de948d78704db21b0b1e1e3aaadcd12a0c3f (patch)
tree8f879f92abc2ec637d611ded07e67a1c0ac3c703 /node_wrangler.py
parent79f241abe001bd8c43b94043c83d236c0a32309f (diff)
Fix T64584: error in node wrangler with cycles add-on disabled
Diffstat (limited to 'node_wrangler.py')
-rw-r--r--node_wrangler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/node_wrangler.py b/node_wrangler.py
index f1aa1e0c..a9ac8477 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -1703,7 +1703,9 @@ class NWEmissionViewer(Operator, NWBase):
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
+ if context.scene.render.engine == 'CYCLES' and hasattr(context.scene, 'cycles'):
+ intensity = 1/context.scene.cycles.film_exposure # Film exposure is a multiplier
+
intensity /= pow(2, (context.scene.view_settings.exposure)) # CM exposure is measured in stops/EVs (2^x)
emission.inputs[1].default_value = intensity