diff options
Diffstat (limited to 'release/scripts/ui/properties_physics_cloth.py')
-rw-r--r-- | release/scripts/ui/properties_physics_cloth.py | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py index 26670438b3f..0ac4429c71a 100644 --- a/release/scripts/ui/properties_physics_cloth.py +++ b/release/scripts/ui/properties_physics_cloth.py @@ -47,7 +47,7 @@ class PhysicButtonsPanel(): def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.type == 'MESH') and (not rd.use_game_engine) + return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.cloth) class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel): @@ -59,21 +59,6 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel): md = context.cloth ob = context.object - split = layout.split() - - if md: - # remove modifier + settings - split.context_pointer_set("modifier", md) - split.operator("object.modifier_remove", text="Remove") - - row = split.row(align=True) - row.prop(md, "show_render", text="") - row.prop(md, "show_viewport", text="") - else: - # add modifier - split.operator("object.modifier_add", text="Add").type = 'CLOTH' - split.label() - if md: cloth = md.settings @@ -232,11 +217,11 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel): def register(): - pass + bpy.utils.register_module(__name__) def unregister(): - pass + bpy.utils.unregister_module(__name__) if __name__ == "__main__": register() |