diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_fluid.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_fluid.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index d334671292a..23b7a12753f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -18,7 +18,13 @@ # <pep8 compliant> import bpy -from bpy.types import Panel +from bpy.types import Panel, Menu + +class FLUID_MT_presets(Menu): + bl_label = "Fluid Presets" + preset_subdir = "fluid" + preset_operator = "script.execute_preset" + draw = Menu.draw_preset class PhysicButtonsPanel(): @@ -222,16 +228,14 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): col = split.column() col.label(text="Viscosity Presets:") - sub = col.column(align=True) - sub.prop(fluid, "viscosity_preset", text="") - - if fluid.viscosity_preset == 'MANUAL': - sub.prop(fluid, "viscosity_base", text="Base") - sub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True) - else: - # just for padding to prevent jumping around - sub.separator() - sub.separator() + sub = col.row(align=True) + sub.menu("FLUID_MT_presets", text=bpy.types.FLUID_MT_presets.bl_label) + sub.operator("fluid.preset_add", text="", icon='ZOOMIN') + sub.operator("fluid.preset_add", text="", icon='ZOOMOUT').remove_active = True + + subsub = col.column(align=True) + subsub.prop(fluid, "viscosity_base", text="Base") + subsub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True) col.label(text="Optimization:") col.prop(fluid, "grid_levels", slider=True) |