Skip to content

Commit

Permalink
Merge pull request #70 from Muream/master
Browse files Browse the repository at this point in the history
include plug indices in their path() and name()
  • Loading branch information
mottosso authored Nov 16, 2021
2 parents f8eefbf + 00a4061 commit 8c2f849
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cmdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -3614,14 +3614,19 @@ def path(self, full=False):
'|persp.translateX'
>>> persp["translateX"].path(full=True)
'|persp.translate.translateX'
>>> persp["worldMatrix"].path()
'|persp.worldMatrix'
>>> persp["worldMatrix"][0].path()
'|persp.worldMatrix[0]'
"""

return "{}.{}".format(
self._node.path(), self._mplug.partialName(
includeNodeName=False,
useLongNames=True,
useFullAttributePath=full
useFullAttributePath=full,
includeInstancedIndices=True,
)
)

Expand All @@ -3640,14 +3645,19 @@ def name(self, long=True, full=False):
'translate.translateX'
>>> persp["tx"].name(long=False, full=True)
't.tx'
>>> persp["worldMatrix"].name()
'worldMatrix'
>>> persp["worldMatrix"][0].name()
'worldMatrix[0]'
"""

return "{}".format(
self._mplug.partialName(
includeNodeName=False,
useLongNames=long,
useFullAttributePath=full
useFullAttributePath=full,
includeInstancedIndices=True,
)
)

Expand Down

0 comments on commit 8c2f849

Please sign in to comment.