diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-01-24 19:15:53 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-01-24 19:23:50 +0300 |
commit | 8d3df01e9dc098c3660491e73da9d6901fd422a1 (patch) | |
tree | 56dd07277546b6fc321df5d95e34b9f235131043 | |
parent | 7a9f102537c1d4d6db7f4d994baf8dcd35cfcb04 (diff) |
Fix T53205: Show Smoke Advance Panel at Outflow type
Now hiding the initial velocity and texture panel when flow behavior is set to outflow.
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_fluid.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 6252ba3bb74..c1b8ae1a36a 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -95,6 +95,16 @@ class PhysicButtonsPanel: md = context.fluid return md and (md.fluid_type == 'FLOW') + @staticmethod + def poll_fluid_flow_outflow(context): + if not PhysicButtonsPanel.poll_fluid_flow(context): + return False + + md = context.fluid + flow = md.flow_settings + if (flow.flow_behavior == 'OUTFLOW'): + return True + class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): bl_label = "Fluid" @@ -507,6 +517,9 @@ class PHYSICS_PT_flow_initial_velocity(PhysicButtonsPanel, Panel): if not PhysicButtonsPanel.poll_fluid_flow(context): return False + if PhysicButtonsPanel.poll_fluid_flow_outflow(context): + return False + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -546,6 +559,9 @@ class PHYSICS_PT_flow_texture(PhysicButtonsPanel, Panel): if not PhysicButtonsPanel.poll_fluid_flow(context): return False + if PhysicButtonsPanel.poll_fluid_flow_outflow(context): + return False + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): |