pep8 changes to rigify (minor warnings still there)

also found quite a few cases where variables were used that hadnt been defined.
This commit is contained in:
2010-01-31 14:33:27 +00:00
parent 22d8742f0d
commit fbadf21b00
18 changed files with 31 additions and 46 deletions

View File

@@ -22,8 +22,8 @@ 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_lid"
@@ -71,12 +71,12 @@ def metarig_definition(obj, orig_bone_name):
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 @@ def metarig_definition(obj, orig_bone_name):
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