diff options
author | Luca Rood <dev@lucarood.com> | 2018-09-26 18:18:16 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2018-09-26 18:49:40 +0300 |
commit | 0666ece2e2f96571200d693d9d7bee1ca72d026f (patch) | |
tree | d19df74e5f36d4a745dd5ea917ccf840a6e61923 /release/scripts/startup/bl_ui/properties_physics_cloth.py | |
parent | a27d97d1b737037e7c09d3052ba5c644588024ec (diff) |
Cloth: Collision improvements
This commit includes several performance, stability, and reliability
improvements to cloth collisions.
Most notably:
* The implementation of a new self-collisions system.
* Multithreading of collision detection.
* Implementation of single sided collisions and normal overrides.
* Replacement of the `plNearestPoints` function from Bullet with a
dedicated solution.
Further, this also includes several bug fixes, and algorithmic
improvements.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D3712
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_cloth.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_cloth.py | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index 983e2910bce..ee2415b26d3 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -224,12 +224,33 @@ class PHYSICS_PT_cloth_shape(PhysicButtonsPanel, Panel): col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="Rest Shape Key") -class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel): - bl_label = "Object Collision" +class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): + bl_label = "Collision" bl_parent_id = 'PHYSICS_PT_cloth' bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + cloth = context.cloth.collision_settings + md = context.cloth + ob = context.object + + layout.active = (cloth.use_collision or cloth.use_self_collision) 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, "collision_quality", text="Quality") + + +class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel): + bl_label = "Object Collision" + bl_parent_id = 'PHYSICS_PT_cloth_collision' + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + def draw_header(self, context): cloth = context.cloth.collision_settings @@ -248,20 +269,18 @@ class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True) col = flow.column() - col.prop(cloth, "collision_quality", text="Quality") col.prop(cloth, "distance_min", slider=True, text="Distance") - col.prop(cloth, "repel_force", slider=True, text="Repel") col = flow.column() - col.prop(cloth, "distance_repel", slider=True, text="Repel Distance") - col.prop(cloth, "friction") + col.prop(cloth, "impulse_clamp") + + col = flow.column() col.prop(cloth, "group") class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): bl_label = "Self Collision" - bl_parent_id = 'PHYSICS_PT_cloth' - bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = 'PHYSICS_PT_cloth_collision' COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw_header(self, context): @@ -283,10 +302,15 @@ class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True) col = flow.column() - col.prop(cloth, "self_collision_quality", text="Quality") + col.prop(cloth, "self_friction", text="Friction") + + col = flow.column() col.prop(cloth, "self_distance_min", slider=True, text="Distance") col = flow.column() + col.prop(cloth, "self_impulse_clamp") + + col = flow.column() col.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="Vertex Group") @@ -363,6 +387,7 @@ classes = ( PHYSICS_PT_cloth_damping, PHYSICS_PT_cloth_cache, PHYSICS_PT_cloth_shape, + PHYSICS_PT_cloth_collision, PHYSICS_PT_cloth_object_collision, PHYSICS_PT_cloth_self_collision, PHYSICS_PT_cloth_property_weights, |