Skip to content

Commit

Permalink
add a safety net to suggested_clamping_value assignment because it ca…
Browse files Browse the repository at this point in the history
…n fail in rare cases
  • Loading branch information
Theverat committed Jan 18, 2019
1 parent dd932d1 commit 88c6436
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,13 @@ def find_suggested_clamp_value(session, scene=None):
suggested_clamping_value = v * v

if scene:
scene.luxcore.config.path.suggested_clamping_value = suggested_clamping_value
try:
# TODO: rework this so it can't fail anymore (some users have reported that it throws an AttributeError)
scene.luxcore.config.path.suggested_clamping_value = suggested_clamping_value
except AttributeError:
print("Warning: could not set suggested_clamping_value property")
import traceback
traceback.print_exc()

return suggested_clamping_value

Expand Down

0 comments on commit 88c6436

Please sign in to comment.