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)

​

On 30 April 2018 at 02:13, justin hidair <[email protected]> wrote:

>
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/1ba158b4-da55-451c-866d-
> 96150afbdbfc%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/1ba158b4-da55-451c-866d-96150afbdbfc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAFRtmOCeRAiZBfTu_t8q6VM-7E-F1T0RA6MBkvE8nenkmU2HYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to