Node Wrangler: add back exposure compensation for Preview Node #105136
@ -565,12 +565,14 @@ class NWPreviewNode(Operator, NWBase):
|
||||
@staticmethod
|
||||
def get_scene_intensity(context):
|
||||
"""Calculate intensity compensation based on scene exposure"""
|
||||
intensity = 1.0
|
||||
# CM exposure is measured in stops/EVs (2^x)
|
||||
intensity = 1.0 / (2.0 ** context.scene.view_settings.exposure)
|
||||
if context.scene.render.engine == 'CYCLES' and hasattr(context.scene, 'cycles'):
|
||||
if context.scene.cycles.film_exposure == 0.0:
|
||||
# Avoid divide by zero error
|
||||
return 1.0
|
||||
# Film exposure is a multiplier
|
||||
intensity /= context.scene.cycles.film_exposure
|
||||
# CM exposure is measured in stops/EVs (2^x)
|
||||
intensity /= 2.0 ** context.scene.view_settings.exposure
|
||||
return intensity
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user