diff options
author | Nathan Vegdahl <cessen@cessen.com> | 2012-03-15 05:02:20 +0400 |
---|---|---|
committer | Nathan Vegdahl <cessen@cessen.com> | 2012-03-15 05:02:20 +0400 |
commit | 4f021e35336b4cba54e798677d462fa1b5598d91 (patch) | |
tree | 84bb42887aaac99e1c41ff6237ca6445a97719c0 | |
parent | 9bce70d1641f3145c332891656232019a5ea71b7 (diff) |
Rigify: patch from Ryan King to give better error messages from
the biped leg rig.
-rw-r--r-- | rigify/rigs/biped/leg/deform.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/rigify/rigs/biped/leg/deform.py b/rigify/rigs/biped/leg/deform.py index e7cd3194..8d70f449 100644 --- a/rigify/rigs/biped/leg/deform.py +++ b/rigify/rigs/biped/leg/deform.py @@ -89,7 +89,7 @@ class Rig: leg_bones = [bone] + connected_children_names(self.obj, bone)[:2] if len(leg_bones) != 2: - raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type" % (strip_org(bone))) + raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type -- leg bones != 2" % (strip_org(bone))) # Get the foot and heel foot = None @@ -101,9 +101,10 @@ class Rig: else: heel = b.name - if foot is None or heel is None: - raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type" % (strip_org(bone))) - + if foot is None: + raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type -- could not find foot bone (that is, a bone with >1 children connected) attached to bone '%s'" % (strip_org(bone), strip_org(shin))) + if heel is None: + raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type -- could not find heel bone (that is, a bone with no childrenconnected) attached to bone '%s'" % (strip_org(bone), strip_org(shin))) # Get the toe toe = None for b in self.obj.data.bones[foot].children: @@ -111,8 +112,8 @@ class Rig: toe = b.name if toe is None: - raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type" % (strip_org(bone))) - + raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type -- toe is None" % (strip_org(bone))) + self.org_bones = leg_bones + [foot, toe, heel] # Get rig parameters |