Hey Guys,

I'm pretty sure I'm either adding this attribute wrong, or missing something 
else. I keep getting an Error when trying to add a kNurbsSurface attribute to a 
node using MFnTypedAttribute (maybe that's not the correct Fn to use?).

The error pops up when the attribute editor is open.  The error I get is:

Cannot use data of type no type in a scalar operation.
Start of trace: (file: C:/Program 
Files/Autodesk/mentalrayForMaya2015/scripts/AETemplates/AEmentalrayNewMessage.mel,
 line 25).
AEmentalrayReplaceMessage (command window: line 1).
AEbuildControls (file: C:/Program 
Files/Autodesk/Maya2015/scripts/others/updateAE.mel, line 530).
updateAE (file: C:/Program 
Files/Autodesk/Maya2015/scripts/others/showEditor.mel, line 4402).
autoUpdateAttrEd (command window: line 1).

which doesn't mean a whole lot to me unfortunately.  The code looks like this:

fnTypeAttr = om.MFnTypedAttribute()

op.inSurface = fnTypeAttr.create("inSurface", "inSurf", 
om.MFnData.kNurbsSurface )
fnTypeAttr.setReadable(1)
fnTypeAttr.setWritable(1)
fnTypeAttr.setStorable(0)
fnTypeAttr.setKeyable(0)

op.addAttribute(op.inSurface)


So how best to add a "inSurface" attribute, if I'm doing it wrong, or how do I 
fix this error if I am adding the attribute correctly?

Thanks!
Kev

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/05b5c478-bf68-473a-852a-d700d095530a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to