Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_cloth.py
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | class PhysicButtonsPanel: | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | ob = context.object | ||||
| return (ob and ob.type == 'MESH') and (context.engine in cls.COMPAT_ENGINES) and (context.cloth) | return (ob and ob.type == 'MESH') and (context.engine in cls.COMPAT_ENGINES) and (context.cloth) | ||||
| class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Cloth" | bl_label = "Cloth" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header_preset(self, context): | def draw_header_preset(self, context): | ||||
| CLOTH_PT_presets.draw_panel_header(self.layout) | CLOTH_PT_presets.draw_panel_header(self.layout) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| Show All 35 Lines | def draw(self, context): | ||||
| row.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="Rest Shape Key") | row.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="Rest Shape Key") | ||||
| row.label(text="", icon='BLANK1') | row.label(text="", icon='BLANK1') | ||||
| class PHYSICS_PT_cloth_pinning(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_pinning(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Pinning" | bl_label = "Pinning" | ||||
| bl_parent_id = 'PHYSICS_PT_cloth' | bl_parent_id = 'PHYSICS_PT_cloth' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| md = context.cloth | md = context.cloth | ||||
| cloth = md.settings | cloth = md.settings | ||||
| self.layout.active = cloth_panel_enabled(md) and cloth.use_pin_cloth | self.layout.active = cloth_panel_enabled(md) and cloth.use_pin_cloth | ||||
| self.layout.prop(cloth, "use_pin_cloth", text="") | self.layout.prop(cloth, "use_pin_cloth", text="") | ||||
| Show All 28 Lines | def draw(self, context): | ||||
| col.prop(cloth, "goal_friction", text="Friction") | col.prop(cloth, "goal_friction", text="Friction") | ||||
| """ | """ | ||||
| class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Cache" | bl_label = "Cache" | ||||
| bl_parent_id = 'PHYSICS_PT_cloth' | bl_parent_id = 'PHYSICS_PT_cloth' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| md = context.cloth | md = context.cloth | ||||
| point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH') | point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH') | ||||
| class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Collision" | bl_label = "Collision" | ||||
| Show All 28 Lines | def draw(self, context): | ||||
| col.prop(cloth, "friction") | col.prop(cloth, "friction") | ||||
| col.prop(cloth, "group") | col.prop(cloth, "group") | ||||
| class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Self Collision" | bl_label = "Self Collision" | ||||
| bl_parent_id = 'PHYSICS_PT_cloth_collision' | bl_parent_id = 'PHYSICS_PT_cloth_collision' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| cloth = context.cloth.collision_settings | cloth = context.cloth.collision_settings | ||||
| self.layout.active = cloth_panel_enabled(context.cloth) and cloth.use_self_collision | self.layout.active = cloth_panel_enabled(context.cloth) and cloth.use_self_collision | ||||
| self.layout.prop(cloth, "use_self_collision", text="") | self.layout.prop(cloth, "use_self_collision", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 18 Lines | def draw(self, context): | ||||
| row.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="Vertex Group") | row.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="Vertex Group") | ||||
| row.label(text="", icon='BLANK1') | row.label(text="", icon='BLANK1') | ||||
| class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Stiffness Scaling" | bl_label = "Stiffness Scaling" | ||||
| bl_parent_id = 'PHYSICS_PT_cloth' | bl_parent_id = 'PHYSICS_PT_cloth' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| cloth = context.cloth.settings | cloth = context.cloth.settings | ||||
| self.layout.active = cloth_panel_enabled(context.cloth) | self.layout.active = cloth_panel_enabled(context.cloth) | ||||
| self.layout.prop(cloth, "use_stiffness_scale", text="") | self.layout.prop(cloth, "use_stiffness_scale", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 29 Lines | def draw(self, context): | ||||
| row.label(text="", icon='BLANK1') | row.label(text="", icon='BLANK1') | ||||
| col.prop(cloth, "bending_stiffness_max", text="Max") | col.prop(cloth, "bending_stiffness_max", text="Max") | ||||
| class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Sewing Springs" | bl_label = "Sewing Springs" | ||||
| bl_parent_id = 'PHYSICS_PT_cloth' | bl_parent_id = 'PHYSICS_PT_cloth' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| cloth = context.cloth.settings | cloth = context.cloth.settings | ||||
| self.layout.active = cloth_panel_enabled(context.cloth) | self.layout.active = cloth_panel_enabled(context.cloth) | ||||
| self.layout.prop(cloth, "use_sewing_springs", text="") | self.layout.prop(cloth, "use_sewing_springs", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 22 Lines | def draw(self, context): | ||||
| col.prop(cloth, "shrink_min", text="Min") | col.prop(cloth, "shrink_min", text="Min") | ||||
| col.prop(cloth, "shrink_max", text="Max") | col.prop(cloth, "shrink_max", text="Max") | ||||
| class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Field Weights" | bl_label = "Field Weights" | ||||
| bl_parent_id = 'PHYSICS_PT_cloth' | bl_parent_id = 'PHYSICS_PT_cloth' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| cloth = context.cloth.settings | cloth = context.cloth.settings | ||||
| effector_weights_ui(self, context, cloth.effector_weights, 'CLOTH') | effector_weights_ui(self, context, cloth.effector_weights, 'CLOTH') | ||||
| classes = ( | classes = ( | ||||
| CLOTH_PT_presets, | CLOTH_PT_presets, | ||||
| Show All 14 Lines | |||||