Fix Cycles rendering files with Simplify wrong after recent changes

The versioning code was not taking into account the old default for AO
bounces.
This commit is contained in:
Brecht Van Lommel 2021-04-06 15:34:13 +02:00
parent 9676a1f61e
commit 24d71acd86
1 changed files with 5 additions and 2 deletions

View File

@ -219,9 +219,12 @@ def do_versions(self):
if version <= (2, 93, 16):
cscene = scene.cycles
if scene.render.use_simplify and \
(cscene.ao_bounces or cscene.ao_bounces_render):
ao_bounces = cscene.get("ao_bounces", 0)
ao_bounces_render = cscene.get("ao_bounces_render", 0)
if scene.render.use_simplify and (ao_bounces or ao_bounces_render):
cscene.use_fast_gi = True
cscene.ao_bounces = ao_bounces
cscene.ao_bounces_render = ao_bounces_render
else:
cscene.ao_bounces = 1
cscene.ao_bounces_render = 1