Cycles: Use tabulated Sobol for old files, for better compatibility

This only has an effect when using Cycles debug settings.

Pull Request: https://projects.blender.org/blender/blender/pulls/112553
This commit is contained in:
Alaska 2023-10-06 18:15:07 +02:00 committed by Brecht Van Lommel
parent b04f006a4c
commit 61a8d1f7d0
1 changed files with 5 additions and 1 deletions

View File

@ -243,11 +243,15 @@ 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
# Disable light tree for existing scenes.
if not cscene.is_property_set("use_light_tree"):
cscene.use_light_tree = False
# Sampling pattern settings are hidden behind a debug menu. Switch to the
# default faster and fully featured (Supports Scrambling Distance)
# Tabulated Sobol.
cscene.sampling_pattern = 'TABULATED_SOBOL'
# Lamps
for light in bpy.data.lights: