Howdy all,
Working a script that needs to create a series of clipboardItems, and
getting  unexpected results when querying out the name (calling
nodeName()). The call returns a string bearing no resemblance to the
one passed in the preceding setNameInfo() call.

Is there something different I need to do to query it out, given that
the return type of the nodeName call is supposed to be an MString,
rather than a python string? In most every other situation I've seen,
the python API handles the switch between MStrings and python strings
pretty seamlessly so this result strikes me as odd (potential user
error?).
Thanks in advance for your help in this.
~dave

################################################
## I.e. something like this ::
from maya.OpenMayaAnim import *

rowCount = 1
childCount = 0
attrCount = 0

# this is the name passed in, expected out
nodeName = "persp"
fullAttributeName = "rotateX"
leafAttributeName = "rotateX"

clipboardItem = MAnimCurveClipboardItem()
clipboardItem.setAddressingInfo(rowCount,childCount, attrCount)
clipboardItem.setNameInfo(nodeName,fullAttributeName,leafAttributeName)

foo = clipboardItem.nodeName()
print(foo)

################################################
## returns ::
>>> _341e962a_p_MString

--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to