diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-11-27 16:56:16 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-11-27 17:01:15 +0300 |
commit | f6cefbef22c8c6583b4927c179dabac3eb57aa22 (patch) | |
tree | 96785e2ee93f34bb14975a53bc2a4e003ee3fb59 /release/scripts/startup/bl_ui/properties_physics_cloth.py | |
parent | eb798de101ac7946e2d719e763ad1f0fd3e26acd (diff) |
Fix T30941: Add cloth air pressure simulation
This adds some basic simulation of internal air pressure inside of
closed cloth mesh objects.
Reviewed By: Jacques Lucke
Differential Revision: http://developer.blender.org/D5473
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_cloth.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_cloth.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index 3e87c9cd0c0..1921521669e 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -161,6 +161,42 @@ class PHYSICS_PT_cloth_damping(PhysicButtonsPanel, Panel): col.prop(cloth, "bending_damping", text="Bending") +class PHYSICS_PT_cloth_pressure(PhysicButtonsPanel, Panel): + bl_label = "Pressure" + bl_parent_id = 'PHYSICS_PT_cloth_physical_properties' + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw_header(self, context): + cloth = context.cloth.settings + + self.layout.active = cloth_panel_enabled(context.cloth) + self.layout.prop(cloth, "use_pressure", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + cloth = context.cloth.settings + md = context.cloth + + layout.active = cloth.use_pressure and cloth_panel_enabled(md) + + flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True) + + col = flow.column() + col.prop(cloth, "uniform_pressure_force") + + col = flow.column() + col.prop(cloth, "use_pressure_volume", text="Custom volume") + + col = flow.column() + col.active = cloth.use_pressure_volume + col.prop(cloth, "target_volume") + + col = flow.column() + col.prop(cloth, "pressure_factor", text="Factor") + + class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): bl_label = "Cache" bl_parent_id = 'PHYSICS_PT_cloth' @@ -382,6 +418,7 @@ classes = ( PHYSICS_PT_cloth_physical_properties, PHYSICS_PT_cloth_stiffness, PHYSICS_PT_cloth_damping, + PHYSICS_PT_cloth_pressure, PHYSICS_PT_cloth_cache, PHYSICS_PT_cloth_shape, PHYSICS_PT_cloth_collision, |