diff options
author | Jacques Lucke <jacques@blender.org> | 2020-10-20 12:00:16 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-10-20 12:00:16 +0300 |
commit | 63a9f24b55d0b5d84d625bdbb44d498fb1f2ae01 (patch) | |
tree | 217fa45ec9b0c66f856dd8b32d8ab3d5cbc18d3d /source/blender/modifiers/intern/MOD_volume_displace.cc | |
parent | f3ecb4c91e159caff2e6d335adb1ccf06423c90f (diff) |
Volumes: simplify volumes in modifiers or on load
This changes how the simplify volumes setting works. Before, it only
affeted viewport rendering. This was an issue, because all internal
computations would still have to happen on the high resolution volumes.
With this patch, the simplify setting already affects file loading and
procedural generation of volumes.
Rendering does not have to care about the simplify option anymore,
it just gets the correct simplified version from the depsgraph.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D9176
Diffstat (limited to 'source/blender/modifiers/intern/MOD_volume_displace.cc')
-rw-r--r-- | source/blender/modifiers/intern/MOD_volume_displace.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc index 18ecefda881..22bf5cd4893 100644 --- a/source/blender/modifiers/intern/MOD_volume_displace.cc +++ b/source/blender/modifiers/intern/MOD_volume_displace.cc @@ -33,6 +33,7 @@ #include "DNA_volume_types.h" #include "DEG_depsgraph_build.h" +#include "DEG_depsgraph_query.h" #include "UI_interface.h" #include "UI_resources.h" @@ -290,6 +291,7 @@ static Volume *modifyVolume(ModifierData *md, const ModifierEvalContext *ctx, Vo VolumeDisplaceModifierData *vdmd = reinterpret_cast<VolumeDisplaceModifierData *>(md); /* Iterate over all grids and displace them one by one. */ + BKE_volume_load(volume, DEG_get_bmain(ctx->depsgraph)); const int grid_amount = BKE_volume_num_grids(volume); for (int grid_index = 0; grid_index < grid_amount; grid_index++) { VolumeGrid *volume_grid = BKE_volume_grid_get(volume, grid_index); |