Quick noobish question! If I have a string attribute, how do I access
it's data in my compute function.

This is how I set it up: (tell me if this is wrong)

nTAttr = OpenMaya.MFnTypedAttribute()

#filename
nTAttr = OpenMaya.MFnTypedAttribute()
readBandedImageNode.filename = nTAttr.create( "filename", "fn",
OpenMaya.MFnData.kString)
nTAttr.setStorable(1)
nTAttr.setReadable(1)
nTAttr.setWritable(1)

And I attempted to pull it like this in my compute...

dataHandle = dataBlock.inputValue( readBandedImageNode.filename )
filenameStr = dataHandle.asString()

but when I attempt to reuse filenameStr it's the object not the actual
string data, where's the conversion I'm missing?
Like so:
_c8b3950f_p_MString


Any help would be greatly appreciated!
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to