Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_softbody.py
| Show All 40 Lines | class PhysicButtonsPanel: | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | ob = context.object | ||||
| return ob and ob.type in COMPAT_OB_TYPES and context.engine in cls.COMPAT_ENGINES and context.soft_body | return ob and ob.type in COMPAT_OB_TYPES and context.engine in cls.COMPAT_ENGINES and context.soft_body | ||||
| class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): | class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Soft Body" | bl_label = "Soft Body" | ||||
| 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): | ||||
| layout = self.layout | layout = self.layout | ||||
| md = context.soft_body | md = context.soft_body | ||||
| ob = context.object | ob = context.object | ||||
| softbody = md.settings | softbody = md.settings | ||||
| Show All 14 Lines | def draw(self, context): | ||||
| layout.prop(softbody, "collision_group") | layout.prop(softbody, "collision_group") | ||||
| class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): | class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Cache" | bl_label = "Cache" | ||||
| bl_parent_id = 'PHYSICS_PT_softbody' | bl_parent_id = 'PHYSICS_PT_softbody' | ||||
| 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.soft_body | md = context.soft_body | ||||
| point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY') | point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY') | ||||
| class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): | class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Goal" | bl_label = "Goal" | ||||
| bl_parent_id = 'PHYSICS_PT_softbody' | bl_parent_id = 'PHYSICS_PT_softbody' | ||||
| 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): | ||||
| softbody = context.soft_body.settings | softbody = context.soft_body.settings | ||||
| self.layout.active = softbody_panel_enabled(context.soft_body) | self.layout.active = softbody_panel_enabled(context.soft_body) | ||||
| self.layout.prop(softbody, "use_goal", text="") | self.layout.prop(softbody, "use_goal", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 24 Lines | def draw(self, context): | ||||
| layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group") | layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group") | ||||
| class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel): | class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Edges" | bl_label = "Edges" | ||||
| bl_parent_id = 'PHYSICS_PT_softbody' | bl_parent_id = 'PHYSICS_PT_softbody' | ||||
| 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): | ||||
| softbody = context.soft_body.settings | softbody = context.soft_body.settings | ||||
| self.layout.active = softbody_panel_enabled(context.soft_body) | self.layout.active = softbody_panel_enabled(context.soft_body) | ||||
| self.layout.prop(softbody, "use_edges", text="") | self.layout.prop(softbody, "use_edges", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 34 Lines | def draw(self, context): | ||||
| col.prop(softbody, "use_edge_collision", text="Edge") | col.prop(softbody, "use_edge_collision", text="Edge") | ||||
| col.prop(softbody, "use_face_collision", text="Face") | col.prop(softbody, "use_face_collision", text="Face") | ||||
| class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): | class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Self Collision" | bl_label = "Self Collision" | ||||
| bl_parent_id = 'PHYSICS_PT_softbody' | bl_parent_id = 'PHYSICS_PT_softbody' | ||||
| 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): | ||||
| softbody = context.soft_body.settings | softbody = context.soft_body.settings | ||||
| self.layout.active = softbody_panel_enabled(context.soft_body) | self.layout.active = softbody_panel_enabled(context.soft_body) | ||||
| self.layout.prop(softbody, "use_self_collision", text="") | self.layout.prop(softbody, "use_self_collision", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 13 Lines | def draw(self, context): | ||||
| col.prop(softbody, "ball_stiff", text="Stiffness") | col.prop(softbody, "ball_stiff", text="Stiffness") | ||||
| col.prop(softbody, "ball_damp", text="Dampening") | col.prop(softbody, "ball_damp", text="Dampening") | ||||
| class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel): | class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Solver" | bl_label = "Solver" | ||||
| bl_parent_id = 'PHYSICS_PT_softbody' | bl_parent_id = 'PHYSICS_PT_softbody' | ||||
| 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): | ||||
| layout = self.layout | layout = self.layout | ||||
| md = context.soft_body | md = context.soft_body | ||||
| softbody = md.settings | softbody = md.settings | ||||
| layout.active = softbody_panel_enabled(md) | layout.active = softbody_panel_enabled(md) | ||||
| Show All 17 Lines | def draw(self, context): | ||||
| layout.prop(softbody, "use_diagnose") | layout.prop(softbody, "use_diagnose") | ||||
| layout.prop(softbody, "use_estimate_matrix") | layout.prop(softbody, "use_estimate_matrix") | ||||
| class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel): | class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Field Weights" | bl_label = "Field Weights" | ||||
| bl_parent_id = 'PHYSICS_PT_softbody' | bl_parent_id = 'PHYSICS_PT_softbody' | ||||
| 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.soft_body | md = context.soft_body | ||||
| softbody = md.settings | softbody = md.settings | ||||
| effector_weights_ui(self, context, softbody.effector_weights, 'SOFTBODY') | effector_weights_ui(self, context, softbody.effector_weights, 'SOFTBODY') | ||||
| Show All 14 Lines | |||||