From 7de86ad61fb1135c9e18f6336b5b01600b381b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Wed, 15 Apr 2020 14:16:13 +0200 Subject: Fluid: Improved cache 'Replay' option When using the 'Replay' cache mode the cache needs to be invalidated whenever simulation variables have been changed. The invalidation will always only affect the according subcaches, e.g. when changing a mesh paramter only the mesh cache will be invalidated, the base cache will remain intact. Before this change Blender always invalidated the entire cache. --- source/blender/makesdna/DNA_fluid_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h index bb85d8304ec..166b3c22932 100644 --- a/source/blender/makesdna/DNA_fluid_types.h +++ b/source/blender/makesdna/DNA_fluid_types.h @@ -541,6 +541,8 @@ enum { FLUID_FLOW_USE_INFLOW = (1 << 5), /* Control how to initialize flow objects. */ FLUID_FLOW_USE_PLANE_INIT = (1 << 6), + /* Notify domain objects about state change (invalidate cache). */ + FLUID_FLOW_NEEDS_UPDATE = (1 << 7), }; typedef struct FluidFlowSettings { @@ -614,6 +616,8 @@ enum { FLUID_EFFECTOR_USE_EFFEC = (1 << 1), /* Control how to initialize flow objects. */ FLUID_EFFECTOR_USE_PLANE_INIT = (1 << 2), + /* Notify domain objects about state change (invalidate cache). */ + FLUID_EFFECTOR_NEEDS_UPDATE = (1 << 3), }; /* Collision objects (filled with smoke). */ -- cgit v1.2.3