diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_softbody.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_softbody.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index a458af739f2..5efe105e7d8 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -26,6 +26,9 @@ from bl_ui.properties_physics_common import ( ) +COMPAT_OB_TYPES = {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'} + + def softbody_panel_enabled(md): return (md.point_cache.is_baked is False) @@ -39,7 +42,7 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (rd.engine in cls.COMPAT_ENGINES) and (context.soft_body) + return ob and ob.type in COMPAT_OB_TYPES and rd.engine in cls.COMPAT_ENGINES and context.soft_body class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): @@ -191,7 +194,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): layout.active = softbody.use_self_collision and softbody_panel_enabled(md) layout.label(text="Collision Ball Size Calculation:") - layout.prop(softbody, "collision_type", expand=True) + layout.row().prop(softbody, "collision_type", expand=True) col = layout.column(align=True) col.label(text="Ball:") @@ -244,5 +247,18 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel): effector_weights_ui(self, context, softbody.effector_weights, 'SOFTBODY') + +classes = ( + PHYSICS_PT_softbody, + PHYSICS_PT_softbody_cache, + PHYSICS_PT_softbody_goal, + PHYSICS_PT_softbody_edge, + PHYSICS_PT_softbody_collision, + PHYSICS_PT_softbody_solver, + PHYSICS_PT_softbody_field_weights, +) + if __name__ == "__main__": # only for live edit. - bpy.utils.register_module(__name__) + from bpy.utils import register_class + for cls in classes: + register_class(cls) |