diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-29 07:54:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-29 07:54:27 +0400 |
commit | 1d838454afb884cf7b288afc7b6915c779230ecb (patch) | |
tree | a8d433cd705f8f3b47e3bb272daccea320f66dba /rigify/rigs/biped/leg | |
parent | 0fcd2037beda8c2ce5fbd29700b1fc5545a29d28 (diff) |
use identity comparison with None (as suggested by python)
Diffstat (limited to 'rigify/rigs/biped/leg')
-rw-r--r-- | rigify/rigs/biped/leg/deform.py | 5 | ||||
-rw-r--r-- | rigify/rigs/biped/leg/fk.py | 6 | ||||
-rw-r--r-- | rigify/rigs/biped/leg/ik.py | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/rigify/rigs/biped/leg/deform.py b/rigify/rigs/biped/leg/deform.py index 2f9b2b02..bb6b6f39 100644 --- a/rigify/rigs/biped/leg/deform.py +++ b/rigify/rigs/biped/leg/deform.py @@ -99,7 +99,7 @@ class Rig: else: heel = b.name - if foot == None or heel == None: + if foot is None or heel is None: raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone))) # Get the toe @@ -108,7 +108,7 @@ class Rig: if b.use_connect == True: toe = b.name - if toe == None: + if toe is None: raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone))) self.org_bones = leg_bones + [foot, toe, heel] @@ -261,4 +261,3 @@ class Rig: con.name = "track_to" con.target = self.obj con.subtarget = stip - diff --git a/rigify/rigs/biped/leg/fk.py b/rigify/rigs/biped/leg/fk.py index bc7a8dbd..e231fa8e 100644 --- a/rigify/rigs/biped/leg/fk.py +++ b/rigify/rigs/biped/leg/fk.py @@ -59,7 +59,7 @@ class Rig: else: heel = b.name - if foot == None or heel == None: + if foot is None or heel is None: raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone))) # Get the toe @@ -69,13 +69,13 @@ class Rig: toe = b.name # Get the toe - if toe == None: + if toe is None: raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone))) self.org_bones = leg_bones + [foot, toe, heel] # Get (optional) parent - if self.obj.data.bones[bone].parent == None: + if self.obj.data.bones[bone].parent is None: self.org_parent = None else: self.org_parent = self.obj.data.bones[bone].parent.name diff --git a/rigify/rigs/biped/leg/ik.py b/rigify/rigs/biped/leg/ik.py index 42ead8b5..265b4e32 100644 --- a/rigify/rigs/biped/leg/ik.py +++ b/rigify/rigs/biped/leg/ik.py @@ -112,7 +112,7 @@ class Rig: if len(b.children) > 0: rocker = b.children[0].name - if foot == None or heel == None: + if foot is None or heel is None: print("blah") raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone))) @@ -123,7 +123,7 @@ class Rig: toe = b.name # Get toe - if toe == None: + if toe is None: raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone))) self.org_bones = leg_bones + [foot, toe, heel, rocker] |