Skip to content

Commit

Permalink
6 lines turns to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mottosso authored Jun 20, 2021
1 parent 358ffc3 commit 035b54a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,19 +834,16 @@ def isA(self, type):
True
>>> node.isA(kShape)
False
>>> node.isA((kShape, kTransform))
True
"""
if isinstance(type, om.MTypeId):
return type == self._fn.typeId
elif isinstance(type, string_types):
return type == self._fn.typeName
elif isinstance(type, (tuple, list)):
for t in type:
if isinstance(t, string_types) and t == self._fn.typeName:
return True
if isinstance(t, om.MTypeId) and t == self._fn.typeId:
return True
return False
return any(self.isA(t) for t in type)
elif isinstance(type, int):
return self._mobject.hasFn(type)
cmds.warning("Unsupported argument passed to isA('%s')" % type)
Expand Down

0 comments on commit 035b54a

Please sign in to comment.