[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25435] trunk/blender/release/scripts/ui/ properties_data_armature.py: fix for python error

Campbell Barton ideasman42 at gmail.com
Thu Dec 17 14:14:29 CET 2009


Revision: 25435
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25435
Author:   campbellbarton
Date:     2009-12-17 14:14:29 +0100 (Thu, 17 Dec 2009)

Log Message:
-----------
fix for python error

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_data_armature.py

Modified: trunk/blender/release/scripts/ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_armature.py	2009-12-17 11:40:12 UTC (rev 25434)
+++ trunk/blender/release/scripts/ui/properties_data_armature.py	2009-12-17 13:14:29 UTC (rev 25435)
@@ -250,45 +250,46 @@
         ob = context.object
 
         itasc = ob.pose.ik_param
-        wide_ui = context.region.width > narrowui
+        wide_ui = (context.region.width > narrowui)
 
         row = layout.row()
         row.prop(ob.pose, "ik_solver")
+        
+        if itasc:
+            layout.prop(itasc, "mode", expand=True)
+            simulation = (itasc.mode == 'SIMULATION')
+            if simulation:
+                layout.label(text="Reiteration:")
+                layout.prop(itasc, "reiteration", expand=True)
 
-        layout.prop(itasc, "mode", expand=True)
-        simulation = itasc.mode == 'SIMULATION'
-        if simulation:
-            layout.label(text="Reiteration:")
-            layout.prop(itasc, "reiteration", expand=True)
+            split = layout.split()
+            split.active = not simulation or itasc.reiteration != 'NEVER'
+            col = split.column()
+            col.prop(itasc, "precision")
 
-        split = layout.split()
-        split.active = not simulation or itasc.reiteration != 'NEVER'
-        col = split.column()
-        col.prop(itasc, "precision")
+            if wide_ui:
+                col = split.column()
+            col.prop(itasc, "num_iter")
 
-        if wide_ui:
-            col = split.column()
-        col.prop(itasc, "num_iter")
 
+            if simulation:
+                layout.prop(itasc, "auto_step")
+                row = layout.row()
+                if itasc.auto_step:
+                    row.prop(itasc, "min_step", text="Min")
+                    row.prop(itasc, "max_step", text="Max")
+                else:
+                    row.prop(itasc, "num_step")
 
-        if simulation:
-            layout.prop(itasc, "auto_step")
-            row = layout.row()
-            if itasc.auto_step:
-                row.prop(itasc, "min_step", text="Min")
-                row.prop(itasc, "max_step", text="Max")
-            else:
-                row.prop(itasc, "num_step")
+            layout.prop(itasc, "solver")
+            if simulation:
+                layout.prop(itasc, "feedback")
+                layout.prop(itasc, "max_velocity")
+            if itasc.solver == 'DLS':
+                row = layout.row()
+                row.prop(itasc, "dampmax", text="Damp", slider=True)
+                row.prop(itasc, "dampeps", text="Eps", slider=True)
 
-        layout.prop(itasc, "solver")
-        if simulation:
-            layout.prop(itasc, "feedback")
-            layout.prop(itasc, "max_velocity")
-        if itasc.solver == 'DLS':
-            row = layout.row()
-            row.prop(itasc, "dampmax", text="Damp", slider=True)
-            row.prop(itasc, "dampeps", text="Eps", slider=True)
-
 bpy.types.register(DATA_PT_context_arm)
 bpy.types.register(DATA_PT_skeleton)
 bpy.types.register(DATA_PT_display)





More information about the Bf-blender-cvs mailing list