From f137022f9919f4dd315ec6b325a08e1bf5aec6fb Mon Sep 17 00:00:00 2001 From: Sriharsha Kotcharlakot Date: Tue, 15 Sep 2020 21:21:14 +0530 Subject: Liquid Simulation Display Options (GSoC 2020) All the changes made in the branch `soc-2020-fluid-tools` are included in this patch. **Major changes:** === Viewport Display === - //Raw voxel display// or //closest (nearest-neighbor)// interpolation for displaying the underlying voxel data of the simulation grids more clearly. - An option to display //gridlines// when the slicing method is //single//. ==== Grid Display ==== - Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Manta GUI. ==== Vector Display ==== - //**M**arker **A**nd **C**ell// grid visualization options for vector grids like velocity or external forces. - Made vector display options available for external forces. ==== Coloring options for //gridlines// ==== - Range highlighting and cell filtering options for displaying the simulation grid data more precisely. - Color gridlines with flags. - Also, made slicing and interpolation options available for Volume Object. Reviewed By: JacquesLucke, sebbas Differential Revision: https://developer.blender.org/D8705 --- source/blender/draw/engines/workbench/workbench_engine.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/draw/engines/workbench/workbench_engine.c') diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c index 80a8f310191..ed9cb17ae28 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.c +++ b/source/blender/draw/engines/workbench/workbench_engine.c @@ -367,9 +367,11 @@ void workbench_cache_populate(void *ved, Object *ob) ModifierData *md = BKE_modifiers_findby_type(ob, eModifierType_Fluid); if (md && BKE_modifier_is_enabled(wpd->scene, md, eModifierMode_Realtime)) { FluidModifierData *fmd = (FluidModifierData *)md; - if (fmd->domain && fmd->domain->type == FLUID_DOMAIN_TYPE_GAS) { + if (fmd->domain) { workbench_volume_cache_populate(vedata, wpd->scene, ob, md, V3D_SHADING_SINGLE_COLOR); - return; /* Do not draw solid in this case. */ + if (fmd->domain->type == FLUID_DOMAIN_TYPE_GAS) { + return; /* Do not draw solid in this case. */ + } } } } -- cgit v1.2.3