[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54032] trunk/blender/release/scripts/ startup/bl_ui: scene panel for rigid body - remove operator isnt greyed out when rigidbody is disabled

Campbell Barton ideasman42 at gmail.com
Wed Jan 23 09:07:45 CET 2013


Revision: 54032
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54032
Author:   campbellbarton
Date:     2013-01-23 08:07:39 +0000 (Wed, 23 Jan 2013)
Log Message:
-----------
scene panel for rigid body - remove operator isnt greyed out when rigidbody is disabled

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
    trunk/blender/release/scripts/startup/bl_ui/properties_scene.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_rigidbody.py	2013-01-23 07:59:07 UTC (rev 54031)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_rigidbody.py	2013-01-23 08:07:39 UTC (rev 54032)
@@ -48,7 +48,7 @@
         ob = context.object
         rbo = ob.rigid_body
         
-        if rbo:
+        if rbo is not None:
             layout.prop(rbo, "type", text="Type")
             
             row = layout.row()

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_scene.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_scene.py	2013-01-23 07:59:07 UTC (rev 54031)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_scene.py	2013-01-23 08:07:39 UTC (rev 54032)
@@ -269,28 +269,30 @@
 
         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
 
-            split = layout.split()
+            colsub = col.column()
+            colsub.prop(rbw, "group")
+            colsub.prop(rbw, "constraints")
 
-            col = split.column()
-            col.prop(rbw, "time_scale", text="Speed")
-            col.prop(rbw, "use_split_impulse")
+            split = col.split()
 
-            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, "time_scale", text="Speed")
+            colsub.prop(rbw, "use_split_impulse")
 
+            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):
     bl_label = "Rigid Body Cache"
     bl_options = {'DEFAULT_CLOSED'}




More information about the Bf-blender-cvs mailing list