Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/ui/properties_physics_softbody.py')
-rw-r--r--release/scripts/ui/properties_physics_softbody.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py
index a07c6a8e43b..7d3fa66ed02 100644
--- a/release/scripts/ui/properties_physics_softbody.py
+++ b/release/scripts/ui/properties_physics_softbody.py
@@ -39,7 +39,7 @@ class PhysicButtonsPanel():
rd = context.scene.render
# return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
# i really hate touching things i do not understand completely .. but i think this should read (bjornmose)
- return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine)
+ return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) and (context.soft_body)
class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
@@ -51,21 +51,6 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
md = context.soft_body
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 = 'SOFT_BODY'
- split.column()
-
if md:
softbody = md.settings
@@ -277,11 +262,11 @@ class PHYSICS_PT_softbody_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()