Create a layer and green icon.

27 views
Skip to first unread message

Darwin Giordano

unread,
Sep 2, 2022, 4:50:14 PM9/2/22
to Python Programming for Autodesk Maya
I create a layer and add the selected object then the layer is selected and finally I don't know how to activate the green color of the layer icon.
Any clue how to activate the green color icon of the selected layer?

green icon.gif

Tenghao Wang

unread,
Sep 2, 2022, 5:34:39 PM9/2/22
to python_in...@googlegroups.com
import maya.cmds as mc
import maya.mel as mm

# select
mm.eval('animLayerEditorOnSelect %s 1' % 'layerName')
# deselect
mm.eval('animLayerEditorOnSelect %s 0' % 'layerName')

--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/4ef28aa4-2404-4483-9b16-e6f189b67214n%40googlegroups.com.

Darwin Giordano

unread,
Sep 2, 2022, 5:48:03 PM9/2/22
to Python Programming for Autodesk Maya
The code is working great, thank you very much!
Reply all
Reply to author
Forward
0 new messages