diff options
author | Patrick Mours <pmours@nvidia.com> | 2019-10-29 18:32:53 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2019-11-04 20:09:56 +0300 |
commit | b45828ebe9c6e729c5d65bb23f913088f3f8672c (patch) | |
tree | 819041cc892fd34d10567f8a9b9682034c59d20f /intern/cycles/blender/blender_object.cpp | |
parent | 8ab6ef30ab28e6c73fc9309c0b21ddbc1cd3afc9 (diff) |
Fix T71123: OptiX error in Cycles viewport when adding HDRI
Cycles did not update the "is_enabled" flag on lights when they were synchronized again, which caused all lights disabled by "LightManager::disable_ineffective_light" to be disabled indefinitely. As a result the OptiX kernels were not reloaded with correct features when a change to a light was made. This fixes that by updating the "is_enabled" flag during synchronization.
Differential Revision: https://developer.blender.org/D6141
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 5520cfd5ecf..6981412bb88 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -269,6 +269,9 @@ void BlenderSync::sync_background_light(BL::SpaceView3D &b_v3d, bool use_portal) light->use_mis = sample_as_light; light->max_bounces = get_int(cworld, "max_bounces"); + /* force enable light again when world is resynced */ + light->is_enabled = true; + int samples = get_int(cworld, "samples"); if (get_boolean(cscene, "use_square_samples")) light->samples = samples * samples; |