[Bf-blender-cvs] [360b3dad980] soc-2022-many-lights-sampling: Fix: toggling light tree crashes Cycles viewport

Jeffrey Liu noreply at git.blender.org
Tue Jul 12 06:32:00 CEST 2022


Commit: 360b3dad9801133712d20fc8c5514b707ab8e690
Author: Jeffrey Liu
Date:   Tue Jul 12 00:08:46 2022 -0400
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB360b3dad9801133712d20fc8c5514b707ab8e690

Fix: toggling light tree crashes Cycles viewport

There were a few issues involved with toggling the light tree setting in
a Cycles vieweport. This was because the light manager wasn't tagged to
update, so the distribution was not constructed correctly.

===================================================================

M	intern/cycles/blender/sync.cpp
M	release/datafiles/locale
M	release/scripts/addons

===================================================================

diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp
index c5e048ede9b..cffd05d38ab 100644
--- a/intern/cycles/blender/sync.cpp
+++ b/intern/cycles/blender/sync.cpp
@@ -345,6 +345,10 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
   integrator->set_use_light_tree(get_boolean(cscene, "use_light_tree"));
   integrator->set_splitting_threshold(get_float(cscene, "splitting_threshold"));
 
+  if (integrator->use_light_tree_is_modified()) {
+    scene->light_manager->tag_update(scene, LightManager::UPDATE_ALL);
+  }
+
   SamplingPattern sampling_pattern = (SamplingPattern)get_enum(
       cscene, "sampling_pattern", SAMPLING_NUM_PATTERNS, SAMPLING_PATTERN_SOBOL);
   integrator->set_sampling_pattern(sampling_pattern);
diff --git a/release/datafiles/locale b/release/datafiles/locale
index 055bc5223c1..9a85b137951 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 055bc5223c1cd249e32ccbc8e8796ba9925c8c33
+Subproject commit 9a85b13795157560b319235c63f5a13b0107ba41
diff --git a/release/scripts/addons b/release/scripts/addons
index 403b95ef6ff..807a64cdfc5 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 403b95ef6ff38918de966ed2a5843cfa3274a58b
+Subproject commit 807a64cdfc50de1cfb263f2eb68680feddb66ec7



More information about the Bf-blender-cvs mailing list