[Bf-extensions-cvs] [8130de94] master: Fix T64584: error in node wrangler with cycles add-on disabled
Brecht Van Lommel
noreply at git.blender.org
Wed Feb 12 11:33:33 CET 2020
Commit: 8130de948d78704db21b0b1e1e3aaadcd12a0c3f
Author: Brecht Van Lommel
Date: Wed Feb 12 11:31:30 2020 +0100
Branches: master
https://developer.blender.org/rBA8130de948d78704db21b0b1e1e3aaadcd12a0c3f
Fix T64584: error in node wrangler with cycles add-on disabled
===================================================================
M node_wrangler.py
===================================================================
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
More information about the Bf-extensions-cvs
mailing list