Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
Improve error message on not finding a particular name.
Browse files Browse the repository at this point in the history
This happened to me when one of the nodes present in the default biped guide got a new name, e.g. `arm_L0_L0_root` which caused the `getName` to return a missing name, e.g. `arm_L0_root`. The previous error message simply said "Object missing: root" whereas now it says "Object missing: arm_L0_root"; a little more descriptive.
  • Loading branch information
mottosso authored and miquelcampos committed Aug 24, 2017
1 parent bcd8e5e commit 41a2608
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/mgear/maya/shifter/component/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ def setFromHierarchy(self, root):
else:
node = dag.findChild(self.model, self.getName(name))
if not node:
mgear.log("Object missing : %s"%name, mgear.sev_warning)
mgear.log("Object missing : %s" % (
self.getName(name), mgear.sev_warning)
)
self.valid = False
continue

Expand All @@ -276,7 +278,9 @@ def setFromHierarchy(self, root):

node = dag.findChild(self.model, self.getName(name))
if not node:
mgear.log("Object missing : %s"%name, mgear.sev_warning)
mgear.log("Object missing : %s" % (
self.getName(name), mgear.sev_warning)
)
self.valid = False
continue

Expand Down

0 comments on commit 41a2608

Please sign in to comment.