diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2019-12-18 02:00:48 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2019-12-18 02:02:29 +0300 |
commit | e6a5e5077bfcca8f56fd7feb914af3c8db72bb50 (patch) | |
tree | c50ae55f214b6a32f6a9233d28182c6f149d344f /source/blender/blenkernel | |
parent | 5ad465c87f43f96e5c9a73c7cf1d52e13b47a5ed (diff) |
Fluid: Fix placement of flag reset
Flag reset needs to be placed outside the object loop
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index e1eeb7f611d..be8c1401b53 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -3131,6 +3131,12 @@ static void update_flowsflags(FluidDomainSettings *mds, Object **flowobjs, int n int active_fields = mds->active_fields; uint flow_index; + /* First, remove all flags that we want to update. */ + int prev_flags = (FLUID_DOMAIN_ACTIVE_INVEL | FLUID_DOMAIN_ACTIVE_OUTFLOW | + FLUID_DOMAIN_ACTIVE_HEAT | FLUID_DOMAIN_ACTIVE_FIRE | + FLUID_DOMAIN_ACTIVE_COLOR_SET | FLUID_DOMAIN_ACTIVE_COLORS); + active_fields &= ~prev_flags; + /* Monitor active fields based on flow settings */ for (flow_index = 0; flow_index < numflowobj; flow_index++) { Object *coll_ob = flowobjs[flow_index]; @@ -3142,12 +3148,6 @@ static void update_flowsflags(FluidDomainSettings *mds, Object **flowobjs, int n continue; } - /* First, remove all flags that we want to update. */ - int prev_flags = (FLUID_DOMAIN_ACTIVE_INVEL | FLUID_DOMAIN_ACTIVE_OUTFLOW | - FLUID_DOMAIN_ACTIVE_HEAT | FLUID_DOMAIN_ACTIVE_FIRE | - FLUID_DOMAIN_ACTIVE_COLOR_SET | FLUID_DOMAIN_ACTIVE_COLORS); - active_fields &= ~prev_flags; - if ((mmd2->type & MOD_FLUID_TYPE_FLOW) && mmd2->flow) { FluidFlowSettings *mfs = mmd2->flow; if (!mfs) { |