From 84451f89f5c1ca84a3647da6906f95f6fe9f6c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Wed, 2 Dec 2020 11:17:13 +0100 Subject: 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. --- intern/cycles/render/volume.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'intern') 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) { -- cgit v1.2.3