diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-12-02 13:17:13 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-12-02 13:18:45 +0300 |
commit | 84451f89f5c1ca84a3647da6906f95f6fe9f6c1f (patch) | |
tree | 939a9d1c8da34e933f772cdd826549540b995056 /intern | |
parent | 67353ae630cc888336782ecb490004c5493d4273 (diff) |
Fix T83300: constant scene refreshing in Cycles with empty volumes
This infinite loop is caused by a conflict between the volume mesh
creation which unintentionally clears the shaders before early exiting
when no grid is found, and the Blender exporter which adds back the
shaders causing us to reupdate as the shaders changed.
To fix this simply preserve the shaders on the Volume node.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/volume.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/render/volume.cpp b/intern/cycles/render/volume.cpp index 4baaae6856c..a1bd16798fb 100644 --- a/intern/cycles/render/volume.cpp +++ b/intern/cycles/render/volume.cpp @@ -528,8 +528,10 @@ void GeometryManager::create_volume_mesh(Volume *volume, Progress &progress) } /* Clear existing volume mesh, done here in case we early out due to - * empty grid or missing volume shader. */ - volume->clear(); + * empty grid or missing volume shader. + * Also keep the shaders to avoid infinite loops when synchronizing, as this will tag the shaders + * as having changed. */ + volume->clear(true); volume->need_update_rebuild = true; if (!volume_shader) { |