Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Reynish <billrey>2018-08-23 18:21:55 +0300
committerPablo Vazquez <venomgfx@gmail.com>2018-08-23 18:21:55 +0300
commitc11997ccfcbf76bac8509d967d74cc608a5d15f8 (patch)
tree45ae1449dfd567b1d6ccd856bf5715ed15e10784 /release
parent23c03bf0cc4fa85e4b5316b47beb3f8e7be2faa7 (diff)
UI: Physics panel minor adjustments
Flow panel had a wrong name when the checkmark was used in the header, fixed alignment in softbody panel & fixed wrong active state for Cloth Pin.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py121
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_softbody.py4
3 files changed, 78 insertions, 49 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 0a7318864a3..86ded4f9d01 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -112,7 +112,7 @@ class PHYSICS_PT_cloth_pinning(PhysicButtonsPanel, Panel):
md = context.cloth
cloth = md.settings
- self.layout.active = cloth_panel_enabled(md) and cloth.use_pin_cloth
+ self.layout.active = cloth_panel_enabled(md)
self.layout.prop(cloth, "use_pin_cloth", text="")
def draw(self, context):
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 451b17b72b7..23fc39f0f54 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -86,23 +86,91 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
col.prop(fluid, "type")
-class PHYSICS_PT_fluid_settings(PhysicButtonsPanel, Panel):
- bl_label = "Settings"
+class PHYSICS_PT_fluid_flow(PhysicButtonsPanel, Panel):
+ bl_label = "Flow"
bl_parent_id = "PHYSICS_PT_fluid"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
+ md = context.fluid
+ fluid = md.settings
+
if not PhysicButtonsPanel.poll_fluid_settings(context):
return False
-
- return (context.engine in cls.COMPAT_ENGINES)
+ return fluid.type in {'INFLOW', 'OUTFLOW', 'CONTROL'} and (context.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
md = context.fluid
fluid = md.settings
- if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID', 'OBSTACLE'}:
- self.layout.prop(fluid, "use", text="")
+
+ self.layout.prop(fluid, "use", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ md = context.fluid
+ fluid = md.settings
+
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
+
+ flow.active = fluid.use
+
+ if fluid.type == 'INFLOW':
+ col = flow.column()
+ col.prop(fluid, "volume_initialization", text="Volume Initialization")
+ col.prop(fluid, "use_animated_mesh")
+
+ row = col.row()
+ row.active = not fluid.use_animated_mesh
+ row.prop(fluid, "use_local_coords")
+
+ col = flow.column()
+ col.prop(fluid, "inflow_velocity", text="Inflow Velocity")
+
+ elif fluid.type == 'OUTFLOW':
+ col = flow.column()
+ col.prop(fluid, "volume_initialization", text="Volume Initialization")
+
+ col = flow.column()
+ col.prop(fluid, "use_animated_mesh")
+
+ elif fluid.type == 'CONTROL':
+ col = flow.column()
+ col.prop(fluid, "quality", slider=True)
+ col.prop(fluid, "use_reverse_frames")
+
+ col = flow.column()
+ col.prop(fluid, "start_time", text="Time Start")
+ col.prop(fluid, "end_time", text="End")
+
+ col.separator()
+
+ col = flow.column()
+ col.prop(fluid, "attraction_strength", text="Attraction Strength")
+ col.prop(fluid, "attraction_radius", text="Radius")
+
+ col.separator()
+
+ col = flow.column(align=True)
+ col.prop(fluid, "velocity_strength", text="Velocity Strength")
+ col.prop(fluid, "velocity_radius", text="Radius")
+
+
+class PHYSICS_PT_fluid_settings(PhysicButtonsPanel, Panel):
+ bl_label = "Settings"
+ bl_parent_id = "PHYSICS_PT_fluid"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
+
+ @classmethod
+ def poll(cls, context):
+ md = context.fluid
+ fluid = md.settings
+
+ if not PhysicButtonsPanel.poll_fluid_settings(context):
+ return False
+ return fluid.type in {'DOMAIN', 'FLUID', 'OBSTACLE', 'PARTICLE'} and (context.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -168,25 +236,6 @@ class PHYSICS_PT_fluid_settings(PhysicButtonsPanel, Panel):
col.prop(fluid, "impact_factor", text="Impact Factor")
- elif fluid.type == 'INFLOW':
- col = flow.column()
- col.prop(fluid, "volume_initialization", text="Volume Initialization")
- col.prop(fluid, "use_animated_mesh")
-
- row = col.row()
- row.active = not fluid.use_animated_mesh
- row.prop(fluid, "use_local_coords")
-
- col = flow.column()
- col.prop(fluid, "inflow_velocity", text="Inflow Velocity")
-
- elif fluid.type == 'OUTFLOW':
- col = flow.column()
- col.prop(fluid, "volume_initialization", text="Volume Initialization")
-
- col = flow.column()
- col.prop(fluid, "use_animated_mesh")
-
elif fluid.type == 'PARTICLE':
col = flow.column()
col.prop(fluid, "particle_influence", text="Influence Size")
@@ -197,27 +246,6 @@ class PHYSICS_PT_fluid_settings(PhysicButtonsPanel, Panel):
col.prop(fluid, "use_floats")
col.prop(fluid, "show_tracer")
- elif fluid.type == 'CONTROL':
- col = flow.column()
- col.prop(fluid, "quality", slider=True)
- col.prop(fluid, "use_reverse_frames")
-
- col = flow.column()
- col.prop(fluid, "start_time", text="Time Start")
- col.prop(fluid, "end_time", text="End")
-
- col.separator()
-
- col = flow.column()
- col.prop(fluid, "attraction_strength", text="Attraction Strength")
- col.prop(fluid, "attraction_radius", text="Radius")
-
- col.separator()
-
- col = flow.column(align=True)
- col.prop(fluid, "velocity_strength", text="Velocity Strength")
- col.prop(fluid, "velocity_radius", text="Radius")
-
class PHYSICS_PT_fluid_particle_cache(PhysicButtonsPanel, Panel):
bl_label = "Cache"
@@ -421,6 +449,7 @@ classes = (
FLUID_PT_presets,
PHYSICS_PT_fluid,
PHYSICS_PT_fluid_settings,
+ PHYSICS_PT_fluid_flow,
PHYSICS_PT_fluid_particle_cache,
PHYSICS_PT_domain_bake,
PHYSICS_PT_domain_boundary,
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py
index 761eb56ca5b..595e462e1c3 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -320,10 +320,10 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
- col = flow.column(align=True)
+ col = flow.column()
col.prop(softbody, "ball_size", text="Ball Size")
- col = flow.column(align=True)
+ col = flow.column()
col.prop(softbody, "ball_stiff", text="Stiffness")
col.prop(softbody, "ball_damp", text="Dampening")