Layer Editor With PyQT

127 views
Skip to first unread message

Kurian O.S

unread,
Sep 7, 2015, 1:09:04 PM9/7/15
to python_in...@googlegroups.com
Hey Guys,

Anyone got any luck to embed maya layer editor inside a pyqt dialog ?. i was able to embed some of the other ui items like panel's outliner etc.. but layer editor I never got any idea. Anyone have any hints ?

Thanks

--
--:: Kurian ::--

Jefri Yeh

unread,
Sep 8, 2015, 10:14:21 AM9/8/15
to python_in...@googlegroups.com
After abit of searching, it seems that Maya creates the layer editor by sourcing "layerEditor.mel" in the script directory, and the script can only create single instance of layerEditor called "DisplayLayerUITabLayout" (repeated sourcing  layerEditor.mel will fail). Thus if we use this unique name and convert it to qt widget, we can then embed it into our own widget. I've pasted the snippets here:


after that don't forget to source layerEditor.mel again to recreate the default layerEditor widget below channelBox...


---Jefri



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

Kurian O.S

unread,
Sep 8, 2015, 12:58:46 PM9/8/15
to python_in...@googlegroups.com
Perfect , thanks Jefri


For more options, visit https://groups.google.com/d/optout.



--
--:: Kurian ::--

Kurian O.S

unread,
Sep 8, 2015, 1:15:59 PM9/8/15
to python_in...@googlegroups.com
This works, but the issue is once if you source the layerEditor.mel then we won't get any update on the wrapped one :(
--
--:: Kurian ::--

yury nedelin

unread,
Sep 8, 2015, 1:22:44 PM9/8/15
to python_in...@googlegroups.com

All LayerEditor.Mel updates take place after Maya is restarted.

Kurian O.S

unread,
Sep 8, 2015, 1:24:38 PM9/8/15
to python_in...@googlegroups.com
I was actually looking for a solution similar to outliner like I can have multiple instance in same maya session. 


For more options, visit https://groups.google.com/d/optout.



--
--:: Kurian ::--

Jefri Yeh

unread,
Sep 8, 2015, 8:50:55 PM9/8/15
to python_in...@googlegroups.com
Yeah too bad that after moving it to our custom UI the layer editor doesn't even work anymore. Seems that it's not designed to work that way. The worst case is you need to look at layerEditor.mel and replicate the functionality... 

Kurian O.S

unread,
Sep 9, 2015, 12:24:33 PM9/9/15
to python_in...@googlegroups.com
I think i will give up on this :)
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CACdyi7oxdvZkHa2iGwwfxvFaqD1ekVrw3J75hHZ3Y6dL39%2BkoA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.


--
--:: Kurian ::--

Reply all
Reply to author
Forward
0 new messages