so far the only solution I found was to set the attribute to keyable and
key the default value if needed but that doens't seems like the best
solution

On Wed, Dec 6, 2017 at 2:11 PM, casf01 <[email protected]> wrote:

>
> I have this node that store an array of 2 double
>
>                 nAttr = om.MFnNumericAttribute()
>                myNode.points = nAttr.create("Points", "p", om.
> MFnNumericData.k2Double)
>              nAttr.storable = True
>           nAttr.readable = True
>           nAttr.array        = True
>               nAttr.writable = True
>           myNode.addAttribute(myNode.points)
>
>
> then when I do go in the node hit add a new item save my scene and re-open
> it, the array is empty but when I change the value to something else like
> (1.0, 0)and save it's fine and it my (1.0, 0 ) value is saved.
>
> It seems like an item with a default value won't save itself :/
>
> What can I do ?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/python_inside_maya/tCrc-C9NpMk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/1cf446d5-f832-4232-bb5e-
> 0d7c74f1ca45%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/1cf446d5-f832-4232-bb5e-0d7c74f1ca45%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/CAGbcAuMppgKKuVmPC9gYpmnsquHvsfsEZV2AQRQCKTdAcQ-rxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to