Skip to content

Commit 8c2f849

Browse files
authored
Merge pull request #70 from Muream/master
include plug indices in their path() and name()
2 parents f8eefbf + 00a4061 commit 8c2f849

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

cmdx.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3614,14 +3614,19 @@ def path(self, full=False):
36143614
'|persp.translateX'
36153615
>>> persp["translateX"].path(full=True)
36163616
'|persp.translate.translateX'
3617+
>>> persp["worldMatrix"].path()
3618+
'|persp.worldMatrix'
3619+
>>> persp["worldMatrix"][0].path()
3620+
'|persp.worldMatrix[0]'
36173621
36183622
"""
36193623

36203624
return "{}.{}".format(
36213625
self._node.path(), self._mplug.partialName(
36223626
includeNodeName=False,
36233627
useLongNames=True,
3624-
useFullAttributePath=full
3628+
useFullAttributePath=full,
3629+
includeInstancedIndices=True,
36253630
)
36263631
)
36273632

@@ -3640,14 +3645,19 @@ def name(self, long=True, full=False):
36403645
'translate.translateX'
36413646
>>> persp["tx"].name(long=False, full=True)
36423647
't.tx'
3648+
>>> persp["worldMatrix"].name()
3649+
'worldMatrix'
3650+
>>> persp["worldMatrix"][0].name()
3651+
'worldMatrix[0]'
36433652
36443653
"""
36453654

36463655
return "{}".format(
36473656
self._mplug.partialName(
36483657
includeNodeName=False,
36493658
useLongNames=long,
3650-
useFullAttributePath=full
3659+
useFullAttributePath=full,
3660+
includeInstancedIndices=True,
36513661
)
36523662
)
36533663

0 commit comments

Comments
 (0)