Cycles: disable light tree for existing scenes, enable on new scenes

While it helps on many scenes, it can be disruptive for existing scenes and
for benchmarks the differences in timing can be confusing. So be a bit more
conservative and only it enable it for new scenes.
This commit is contained in:
Brecht Van Lommel 2022-12-13 20:10:39 +01:00
parent 2221cfc044
commit ecfcf1b97b
Notes: blender-bot 2023-09-20 01:02:37 +02:00
Referenced by pull request #112553, Cycles: Switch to default Tabulated Sobol when loading older files
1 changed files with 6 additions and 0 deletions

View File

@ -241,6 +241,12 @@ def do_versions(self):
layer.samples *= layer.samples
cscene["use_square_samples"] = False
# Disable light tree for existing scenes.
if version <= (3, 5, 3):
cscene = scene.cycles
if not cscene.is_property_set("use_light_tree"):
cscene.use_light_tree = False
# Lamps
for light in bpy.data.lights:
if light.library not in libraries: