On Wed, Jul 18, 2018, 6:11 AM Marcus Ottosson <konstrukt...@gmail.com>
wrote:

> Hi all,
>
> Hiding an attribute from the channel box can be done with..
>
> from maya import cmds
>
> node = cmds.createNode("transform")
> cmds.setAttr(node + ".translateX", keyable=False)
>
> And the equivalent from the API..
>
> from maya.api import OpenMaya as om
>
> fn = om.MFnDagNode()
> mobj = fn.create("transform")
> mplug = fn.findPlug("translateX", False)
> mplug.isKeyable = False
>
> But! Upon saving and reopening the scene, the hidden state persist with
> cmds.setAttr, but not with isKeyable = False. Tested in Maya 2015, SP6.
>

Does "mplug.isChannelBox = False" be have the same way with not saving the
state with the scene?

> Any idea how I can have it be saved with the scene?
>
> Best,
> Marcus
> ​
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCiE65wDA8CiB2mUVhhqOf2rbyAd%2BkKH8fCn4UimW-gVw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCiE65wDA8CiB2mUVhhqOf2rbyAd%2BkKH8fCn4UimW-gVw%40mail.gmail.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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3ADbdXjPz6MJNnYjgX_FWh1Hhb9B2Cio5drywD2M91LA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to