From 8d3df01e9dc098c3660491e73da9d6901fd422a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Fri, 24 Jan 2020 17:15:53 +0100 Subject: Fix T53205: Show Smoke Advance Panel at Outflow type Now hiding the initial velocity and texture panel when flow behavior is set to outflow. --- .../scripts/startup/bl_ui/properties_physics_fluid.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'release') 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): -- cgit v1.2.3