This works for me.
from maya.api import OpenMaya as om
fn = om.MFnDagNode()
mobj = fn.create("transform", "MyTransform")
fna = om.MFnNumericAttribute(mobj)
attr = fna.create("longName", "shortName", om.MFnNumericData.kDouble, 1.0)
fna.storable = True
fna.writable = True
fna.readable = True
fna.keyable = True
fn.addAttribute(attr)
I have never used dynamic attributes , but from what I saw in the devkit (example on dynamic attributes), it is fairly simple , all you need is to overload setDependentsDirty() and predict what attributes are going to pop
--
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1ba158b4-da55-451c-866d-96150afbdbfc%40googlegroups.com.