diff options
author | Jacques Lucke <jacques@blender.org> | 2020-11-04 15:21:43 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-11-04 15:21:43 +0300 |
commit | cfcdae5549f37198fa8e66ee512f1093764ef022 (patch) | |
tree | f7bb1e019a83c3547eb5d72ea8f9840f5b93cd7d /source/blender/modifiers/intern | |
parent | ba6977cb8b8125e1fdebb3f876910ceaeadbe103 (diff) |
Fix T82393: Volume to Mesh modifier with sequence fails during rendering
The issue was that the volume for the current frame
might not have been loaded already by the time the
modifier runs.
The solution is simply to make sure that the volume
is loaded. This is similar to the Volume Displace modifier.
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_volume_to_mesh.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc index 8146c4ca84a..11d30c1f173 100644 --- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc +++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc @@ -45,6 +45,8 @@ #include "BLI_span.hh" #include "BLI_timeit.hh" +#include "DEG_depsgraph_query.h" + #ifdef WITH_OPENVDB # include <openvdb/tools/GridTransformer.h> # include <openvdb/tools/VolumeToMesh.h> @@ -281,6 +283,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * Volume *volume = static_cast<Volume *>(vmmd->object->data); + BKE_volume_load(volume, DEG_get_bmain(ctx->depsgraph)); VolumeGrid *volume_grid = BKE_volume_grid_find(volume, vmmd->grid_name); if (volume_grid == nullptr) { BKE_modifier_set_error(md, "Cannot find '%s' grid", vmmd->grid_name); |