[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31600] trunk/blender/release/scripts: fix some errors in rigify caused by recent api changes

Campbell Barton ideasman42 at gmail.com
Fri Aug 27 02:05:01 CEST 2010


Revision: 31600
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31600
Author:   campbellbarton
Date:     2010-08-27 02:05:00 +0200 (Fri, 27 Aug 2010)

Log Message:
-----------
fix some errors in rigify caused by recent api changes

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/rigify/neck_flex.py
    trunk/blender/release/scripts/modules/rigify/palm_curl.py
    trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py
    trunk/blender/release/scripts/modules/rigify/tongue.py
    trunk/blender/release/scripts/modules/rigify_utils.py
    trunk/blender/release/scripts/ui/properties_data_bone.py

Modified: trunk/blender/release/scripts/modules/rigify/neck_flex.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/neck_flex.py	2010-08-26 23:49:46 UTC (rev 31599)
+++ trunk/blender/release/scripts/modules/rigify/neck_flex.py	2010-08-27 00:05:00 UTC (rev 31600)
@@ -262,7 +262,7 @@
     fcurve = ex.head_ctrl_p.driver_add('["bend_tot"]')
     driver = fcurve.driver
     driver.type = 'SUM'
-    fcurve.modifiers.remove(0) # grr dont need a modifier
+    fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
     for i in range(len(neck_chain)):
         var = driver.variables.new()
@@ -301,7 +301,7 @@
         driver.type = 'SCRIPTED'
         driver.expression = "bend/bend_tot"
 
-        fcurve.modifiers.remove(0) # grr dont need a modifier
+        fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
 
         # add target

Modified: trunk/blender/release/scripts/modules/rigify/palm_curl.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/palm_curl.py	2010-08-26 23:49:46 UTC (rev 31599)
+++ trunk/blender/release/scripts/modules/rigify/palm_curl.py	2010-08-27 00:05:00 UTC (rev 31600)
@@ -194,7 +194,7 @@
     driver.expression = "(1.0-cos(x))-s"
 
     for fcurve in driver_fcurves:
-        fcurve.modifiers.remove(0) # grr dont need a modifier
+        fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
     var = driver.variables.new()
     var.name = "x"

Modified: trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py	2010-08-26 23:49:46 UTC (rev 31599)
+++ trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py	2010-08-27 00:05:00 UTC (rev 31600)
@@ -353,7 +353,7 @@
     fcurve = ex.ribcage_copy_p.driver_add('["bend_tot"]')
     driver = fcurve.driver
     driver.type = 'SUM'
-    fcurve.modifiers.remove(0) # grr dont need a modifier
+    fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
     for i in range(spine_chain_len - 1):
         var = driver.variables.new()
@@ -390,7 +390,7 @@
         driver.type = 'SCRIPTED'
         driver.expression = "bend/bend_tot"
 
-        fcurve.modifiers.remove(0) # grr dont need a modifier
+        fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
 
         # add target

Modified: trunk/blender/release/scripts/modules/rigify/tongue.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/tongue.py	2010-08-26 23:49:46 UTC (rev 31599)
+++ trunk/blender/release/scripts/modules/rigify/tongue.py	2010-08-27 00:05:00 UTC (rev 31600)
@@ -266,7 +266,7 @@
     fcurve = ex.head_ctrl_p.driver_add('["bend_tot"]')
     driver = fcurve.driver
     driver.type = 'SUM'
-    fcurve.modifiers.remove(0) # grr dont need a modifier
+    fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
     for i in range(len(neck_chain)):
         var = driver.variables.new()
@@ -313,7 +313,7 @@
         driver.type = 'SCRIPTED'
         driver.expression = "bend/bend_tot"
 
-        fcurve.modifiers.remove(0) # grr dont need a modifier
+        fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
 
         # add target

Modified: trunk/blender/release/scripts/modules/rigify_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify_utils.py	2010-08-26 23:49:46 UTC (rev 31599)
+++ trunk/blender/release/scripts/modules/rigify_utils.py	2010-08-27 00:05:00 UTC (rev 31600)
@@ -157,7 +157,7 @@
         fcurve = con.driver_add("influence")
         driver = fcurve.driver
         driver.type = 'AVERAGE'
-        fcurve.modifiers.remove(0) # grr dont need a modifier
+        fcurve.modifiers.remove(fcurve.modifiers[0]) # grr dont need a modifier
 
         blend_target(driver)
 

Modified: trunk/blender/release/scripts/ui/properties_data_bone.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_bone.py	2010-08-26 23:49:46 UTC (rev 31599)
+++ trunk/blender/release/scripts/ui/properties_data_bone.py	2010-08-27 00:05:00 UTC (rev 31600)
@@ -224,7 +224,7 @@
         row.prop(ob.pose, "ik_solver")
 
         split = layout.split(percentage=0.25)
-        split.prop(pchan, "lock_ik_x", text="Lock X")
+        split.prop(pchan, "lock_ik_x", icon='LOCKED' if pchan.lock_ik_x else 'UNLOCKED', text="X")
         split.active = pchan.is_in_ik_chain
         row = split.row()
         row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
@@ -241,8 +241,8 @@
         sub.active = pchan.lock_ik_x == False and pchan.use_ik_limit_x and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
-        split.prop(pchan, "lock_ik_y", text="Y")
-        split.active = pchan.is_in_ik_chain and pchan.is_in_ik_chain
+        split.prop(pchan, "lock_ik_y", icon='LOCKED' if pchan.lock_ik_y else 'UNLOCKED', text="Y")
+        split.active = pchan.is_in_ik_chain
         row = split.row()
         row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
         row.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
@@ -259,8 +259,8 @@
         sub.active = pchan.lock_ik_y == False and pchan.use_ik_limit_y and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
-        split.prop(pchan, "lock_ik_z", text="Z")
-        split.active = pchan.is_in_ik_chain and pchan.is_in_ik_chain
+        split.prop(pchan, "lock_ik_z", icon='LOCKED' if pchan.lock_ik_z else 'UNLOCKED', text="Z")
+        split.active = pchan.is_in_ik_chain
         sub = split.row()
         sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
         sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
@@ -274,10 +274,12 @@
         sub.prop(pchan, "ik_min_z", text="")
         sub.prop(pchan, "ik_max_z", text="")
         sub.active = pchan.lock_ik_z == False and pchan.use_ik_limit_z and pchan.is_in_ik_chain
-        split = layout.split()
-        split.prop(pchan, "ik_stretch", text="Stretch", slider=True)
-        split.label()
-        split.active = pchan.is_in_ik_chain
+ 
+        split = layout.split(percentage=0.25)
+        split.label(text="Stretch:")
+        sub = split.row()
+        sub.prop(pchan, "ik_stretch", text="", slider=True)
+        sub.active = pchan.is_in_ik_chain
 
         if ob.pose.ik_solver == 'ITASC':
             split = layout.split()





More information about the Bf-blender-cvs mailing list