scene panel for rigid body - remove operator isnt greyed out when rigidbody is disabled
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2013 08:07:39 +0000 (08:07 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2013 08:07:39 +0000 (08:07 +0000)
release/scripts/startup/bl_ui/properties_physics_rigidbody.py
release/scripts/startup/bl_ui/properties_scene.py

index 218d4be..afc654f 100644 (file)
@@ -48,7 +48,7 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
         ob = context.object
         rbo = ob.rigid_body
         
-        if rbo:
+        if rbo is not None:
             layout.prop(rbo, "type", text="Type")
             
             row = layout.row()
index 3654f70..afd9632 100644 (file)
@@ -269,26 +269,28 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
 
         rbw = scene.rigidbody_world
 
-        if not rbw:
+        if rbw is None:
             layout.operator("rigidbody.world_add")
         else:
-            split = layout.split()
-            split.operator("rigidbody.world_remove")
-            layout.active = rbw.enabled
+            col = layout.column()
+            col.operator("rigidbody.world_remove")
 
             col = layout.column()
-            col.prop(rbw, "group")
-            col.prop(rbw, "constraints")
+            col.active = rbw.enabled
+
+            colsub = col.column()
+            colsub.prop(rbw, "group")
+            colsub.prop(rbw, "constraints")
 
-            split = layout.split()
+            split = col.split()
 
-            col = split.column()
-            col.prop(rbw, "time_scale", text="Speed")
-            col.prop(rbw, "use_split_impulse")
+            colsub = split.column()
+            colsub.prop(rbw, "time_scale", text="Speed")
+            colsub.prop(rbw, "use_split_impulse")
 
-            col = split.column()
-            col.prop(rbw, "steps_per_second", text="Steps Per Second")
-            col.prop(rbw, "num_solver_iterations", text="Solver Iterations")
+            colsub = split.column()
+            colsub.prop(rbw, "steps_per_second", text="Steps Per Second")
+            colsub.prop(rbw, "num_solver_iterations", text="Solver Iterations")
 
 
 class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel):