From 21f6bac0a33d6613b0a8033be6fcb6befd419cc9 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sat, 21 Apr 2012 22:09:09 +0000 Subject: [PATCH] Fix [#30954] Fluid obstacle checkbox has no effect Note: Supporting obstacles which can be enabled/disabled as animated propoerty is not likely to happen. So I marked this as "Won't fix"/TODO. I also reverted last commit on this bug because it didn't work and disabled the property from UI to avoid confusion. --- intern/elbeem/intern/solver_init.cpp | 4 +--- release/scripts/startup/bl_ui/properties_physics_fluid.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/intern/elbeem/intern/solver_init.cpp b/intern/elbeem/intern/solver_init.cpp index 58f45e4fbfb..7e9f5e7f420 100644 --- a/intern/elbeem/intern/solver_init.cpp +++ b/intern/elbeem/intern/solver_init.cpp @@ -1453,9 +1453,7 @@ void LbmFsgrSolver::initMovingObstacles(bool staticInit) { //errMsg("GEOACTT"," obj "<getName()<<" a:"<getGeoInitType()); continue; } - /* DG: only inflows/outlfows could be activated/deactivated, test new code that everything can be activated - if((!active) && (otype&(CFMbndOutflow|CFMbndInflow)) ) continue; */ - if((!active) /* && (otype&(CFMbndOutflow|CFMbndInflow)) */ ) continue; + if((!active) && (otype&(CFMbndOutflow|CFMbndInflow)) ) continue; // copied from recalculateObjectSpeeds mObjectSpeeds[OId] = vec2L(mpParam->calculateLattVelocityFromRw( vec2P( (*mpGiObjects)[OId]->getInitialVelocity(mSimulationTime) ))); diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index cec4bf125ee..beb525bbd07 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -55,11 +55,11 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): return col.prop(fluid, "type") - if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}: + if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID', 'OBSTACLE'}: col.prop(fluid, "use") layout = layout.column() - if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}: + if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID', 'OBSTACLE'}: layout.active = fluid.use if fluid.type == 'DOMAIN':