[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26471] trunk/blender/release/scripts/ modules: pep8 changes to rigify (minor warnings still there)

Campbell Barton ideasman42 at gmail.com
Sun Jan 31 15:33:27 CET 2010


Revision: 26471
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26471
Author:   campbellbarton
Date:     2010-01-31 15:33:27 +0100 (Sun, 31 Jan 2010)

Log Message:
-----------
pep8 changes to rigify (minor warnings still there)
also found quite a few cases where variables were used that hadnt been defined.

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/rigify/arm_biped.py
    trunk/blender/release/scripts/modules/rigify/copy.py
    trunk/blender/release/scripts/modules/rigify/eye_balls.py
    trunk/blender/release/scripts/modules/rigify/eye_lid.py
    trunk/blender/release/scripts/modules/rigify/finger_curl.py
    trunk/blender/release/scripts/modules/rigify/leg_biped.py
    trunk/blender/release/scripts/modules/rigify/leg_quadruped.py
    trunk/blender/release/scripts/modules/rigify/mouth.py
    trunk/blender/release/scripts/modules/rigify/neck_flex.py
    trunk/blender/release/scripts/modules/rigify/palm_curl.py
    trunk/blender/release/scripts/modules/rigify/shape_key_distance.py
    trunk/blender/release/scripts/modules/rigify/shape_key_rotdiff.py
    trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py
    trunk/blender/release/scripts/modules/rigify/stretch.py
    trunk/blender/release/scripts/modules/rigify/stretch_twist.py
    trunk/blender/release/scripts/modules/rigify/track_dual.py
    trunk/blender/release/scripts/modules/rigify/track_reverse.py
    trunk/blender/release/scripts/modules/rigify_utils.py

Modified: trunk/blender/release/scripts/modules/rigify/arm_biped.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/arm_biped.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/arm_biped.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -20,7 +20,7 @@
 
 import bpy
 from math import radians, pi
-from rigify import RigifyError, get_layer_dict, ORG_PREFIX
+from rigify import RigifyError, ORG_PREFIX
 from rigify_utils import bone_class_instance, copy_bone_simple, add_pole_target_bone, add_stretch_to, blend_bone_list, get_side_name, get_base_name
 from rna_prop_ui import rna_idprop_ui_prop_get
 from Mathutils import Vector

Modified: trunk/blender/release/scripts/modules/rigify/copy.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/copy.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/copy.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -19,7 +19,6 @@
 # <pep8 compliant>
 
 import bpy
-from rigify import get_layer_dict
 from rigify_utils import bone_class_instance, copy_bone_simple
 
 METARIG_NAMES = ("cpy",)

Modified: trunk/blender/release/scripts/modules/rigify/eye_balls.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/eye_balls.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/eye_balls.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -20,10 +20,9 @@
 
 import bpy
 from rna_prop_ui import rna_idprop_ui_prop_get
-from math import acos
 from Mathutils import Vector
-from rigify import get_layer_dict
-from rigify_utils import bone_class_instance, copy_bone_simple
+from rigify import RigifyError
+from rigify_utils import copy_bone_simple
 
 #METARIG_NAMES = ("cpy",)
 RIG_TYPE = "eye_balls"
@@ -70,7 +69,7 @@
     try:
         chain += [bone.parent.name, bone.name]
     except AttributeError:
-        raise RigifyError("'%s' rig type requires a parent (bone: %s)" % (RIG_TYPE, base_names[0]))
+        raise RigifyError("'%s' rig type requires a parent (bone: %s)" % (RIG_TYPE, orig_bone_name))
 
     return chain
 

Modified: trunk/blender/release/scripts/modules/rigify/eye_lid.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/eye_lid.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/eye_lid.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -22,8 +22,8 @@
 from rna_prop_ui import rna_idprop_ui_prop_get
 from math import acos
 from Mathutils import Vector
-from rigify import get_layer_dict
-from rigify_utils import bone_class_instance, copy_bone_simple
+from rigify import RigifyError
+from rigify_utils import copy_bone_simple
 
 #METARIG_NAMES = ("cpy",)
 RIG_TYPE = "eye_lid"
@@ -71,12 +71,12 @@
     try:
         chain += [bone.parent.parent.name, bone.parent.name, bone.name]
     except AttributeError:
-        raise RigifyError("'%s' rig type requires a chain of two parents (bone: %s)" % (RIG_TYPE, base_names[0]))
+        raise RigifyError("'%s' rig type requires a chain of two parents (bone: %s)" % (RIG_TYPE, orig_bone_name))
 
     chain += [child.name for child in bone.children_recursive_basename]
 
     if len(chain) < 10:
-        raise RigifyError("'%s' rig type requires a chain of 10 bones (bone: %s)" % (RIG_TYPE, base_names[0]))
+        raise RigifyError("'%s' rig type requires a chain of 10 bones (bone: %s)" % (RIG_TYPE, orig_bone_name))
 
     chain = chain[:10]
 
@@ -84,7 +84,7 @@
         chain += [bb[chain[9]].children[0].name]
         chain += [bb[chain[10]].children[0].name]
     except IndexError:
-        raise RigifyError("'%s' rig type requires a chain of 10 bones (bone: %s)" % (RIG_TYPE, base_names[0]))
+        raise RigifyError("'%s' rig type requires a chain of 10 bones (bone: %s)" % (RIG_TYPE, orig_bone_name))
 
     return chain
 

Modified: trunk/blender/release/scripts/modules/rigify/finger_curl.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/finger_curl.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/finger_curl.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -19,10 +19,9 @@
 # <pep8 compliant>
 
 import bpy
-from rigify import RigifyError, get_layer_dict
+from rigify import RigifyError
 from rigify_utils import copy_bone_simple, get_side_name
 from rna_prop_ui import rna_idprop_ui_prop_get
-from functools import reduce
 
 METARIG_NAMES = "finger_01", "finger_02", "finger_03"
 

Modified: trunk/blender/release/scripts/modules/rigify/leg_biped.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/leg_biped.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/leg_biped.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -20,7 +20,7 @@
 
 import bpy
 from math import pi
-from rigify import RigifyError, get_layer_dict
+from rigify import RigifyError
 from rigify_utils import bone_class_instance, copy_bone_simple, blend_bone_list, get_side_name, get_base_name
 from rna_prop_ui import rna_idprop_ui_prop_get
 

Modified: trunk/blender/release/scripts/modules/rigify/leg_quadruped.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/leg_quadruped.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/leg_quadruped.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -22,7 +22,7 @@
 from rna_prop_ui import rna_idprop_ui_prop_get
 from math import pi
 from rigify import RigifyError
-from rigify_utils import bone_class_instance, copy_bone_simple, add_pole_target_bone, get_side_name, get_base_name
+from rigify_utils import bone_class_instance, copy_bone_simple, get_side_name, get_base_name
 from Mathutils import Vector
 
 METARIG_NAMES = "hips", "thigh", "shin", "foot", "toe"

Modified: trunk/blender/release/scripts/modules/rigify/mouth.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/mouth.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/mouth.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -22,8 +22,8 @@
 from rna_prop_ui import rna_idprop_ui_prop_get
 from math import acos, pi
 from Mathutils import Vector
-from rigify import get_layer_dict, RigifyError
-from rigify_utils import bone_class_instance, copy_bone_simple
+from rigify import RigifyError
+from rigify_utils import copy_bone_simple
 
 #METARIG_NAMES = ("cpy",)
 RIG_TYPE = "mouth"
@@ -105,12 +105,12 @@
     try:
         chain += [bone.parent.parent.name, bone.parent.name, bone.name]
     except AttributeError:
-        raise RigifyError("'%s' rig type requires a chain of two parents (bone: %s)" % (RIG_TYPE, base_names[0]))
+        raise RigifyError("'%s' rig type requires a chain of two parents (bone: %s)" % (RIG_TYPE, orig_bone_name))
 
     chain += [child.name for child in bone.children_recursive_basename]
 
     if len(chain) < 10:
-        raise RigifyError("'%s' rig type requires a chain of 8 bones (bone: %s)" % (RIG_TYPE, base_names[0]))
+        raise RigifyError("'%s' rig type requires a chain of 8 bones (bone: %s)" % (RIG_TYPE, orig_bone_name))
 
     return chain[:10]
 

Modified: trunk/blender/release/scripts/modules/rigify/neck_flex.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/neck_flex.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/neck_flex.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 
 import bpy
-from rigify import RigifyError, get_layer_dict
+from rigify import RigifyError
 from rigify_utils import bone_class_instance, copy_bone_simple
 from rna_prop_ui import rna_idprop_ui_prop_get
 

Modified: trunk/blender/release/scripts/modules/rigify/palm_curl.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/palm_curl.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/palm_curl.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -19,7 +19,6 @@
 # <pep8 compliant>
 
 import bpy
-from rigify import get_layer_dict
 from rigify_utils import copy_bone_simple, get_side_name
 from rna_prop_ui import rna_idprop_ui_prop_get
 

Modified: trunk/blender/release/scripts/modules/rigify/shape_key_distance.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/shape_key_distance.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/shape_key_distance.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -19,11 +19,7 @@
 # <pep8 compliant>
 
 import bpy
-from rna_prop_ui import rna_idprop_ui_prop_get
-from math import acos
-from Mathutils import Vector
-from rigify import get_layer_dict
-from rigify_utils import bone_class_instance, copy_bone_simple
+from rigify import RigifyError
 
 #METARIG_NAMES = ("cpy",)
 RIG_TYPE = "shape_key_distance"

Modified: trunk/blender/release/scripts/modules/rigify/shape_key_rotdiff.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/shape_key_rotdiff.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/shape_key_rotdiff.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -19,11 +19,7 @@
 # <pep8 compliant>
 
 import bpy
-from rna_prop_ui import rna_idprop_ui_prop_get
-from math import acos
-from Mathutils import Vector
-from rigify import get_layer_dict
-from rigify_utils import bone_class_instance, copy_bone_simple
+from rigify import RigifyError
 
 #METARIG_NAMES = ("cpy",)
 RIG_TYPE = "shape_key_rotdiff"

Modified: trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py	2010-01-31 14:30:21 UTC (rev 26470)
+++ trunk/blender/release/scripts/modules/rigify/spine_pivot_flex.py	2010-01-31 14:33:27 UTC (rev 26471)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 
 import bpy
-from rigify import get_layer_dict
+from rigify import RigifyError

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list