[Bf-blender-cvs] [5473f0c49dc] blender-v2.83-release: Fix T76468: volume sequence render not using correct frame in renders

Brecht Van Lommel noreply at git.blender.org
Thu May 7 21:14:53 CEST 2020


Commit: 5473f0c49dc8e6bd4708ab48bb944b7265c88ace
Author: Brecht Van Lommel
Date:   Thu May 7 21:13:14 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB5473f0c49dc8e6bd4708ab48bb944b7265c88ace

Fix T76468: volume sequence render not using correct frame in renders

Render datablocks were copying state from original datablocks, where the frame
number and loaded volume grids were out of sync.

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

M	source/blender/blenkernel/intern/volume.cc

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

diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
index 9d9e8423bcf..b0b7a60b556 100644
--- a/source/blender/blenkernel/intern/volume.cc
+++ b/source/blender/blenkernel/intern/volume.cc
@@ -815,7 +815,10 @@ void BKE_volume_eval_geometry(struct Depsgraph *depsgraph, Volume *volume)
   /* Flush back to original. */
   if (DEG_is_active(depsgraph)) {
     Volume *volume_orig = (Volume *)DEG_get_original_id(&volume->id);
-    volume_orig->runtime.frame = volume->runtime.frame;
+    if (volume_orig->runtime.frame != volume->runtime.frame) {
+      BKE_volume_unload(volume_orig);
+      volume_orig->runtime.frame = volume->runtime.frame;
+    }
   }
 }



More information about the Bf-blender-cvs mailing list