Hi, I’m looking for a way to create a UI that can be added to Maya’s native UI. Currently I haven’t found a way to do it.
Does anyone know how to do it?
I want to add a few tool buttons in the red position
And here, I want to create a UI that can be dragged and snapped into the Maya UI like this.
Thank you very much .__.
both of these are different in functions:
-
this is modifying an existing maya widget:
you will need to find the correct widget name (hope that its consistant) and insert elements through cmds, or wrap its instance to a qt object and insert data with pyside, this can be quite tricky to keep consistant, especially if you want maya to startup with this by default
-
this is called dockwidgets, this can be achieved with both cmds and pyside, for pyside there are a couple of methods but the easiest would be to use the MayaQWidgetDockableMixin to get the general setup that maya uses by default, the cmds method uses dockcontrol
Thank you for your information, I will learn more
For the second example, I wouldn’t use neither the MayaQWidgetDockableMixin nor the dockControl command, as they won’t allow you to dock your windows everywhere, but only “top”, “left”, “right” and “bottom”. You want to use a workspaceControl
command, as that will allow free docking everywhere and can preserve window position and docking when Maya shuts down!
This topic is interesting. I remember around 2010 or something, there was a tool called Graph Editor Redux that totally replace Maya Graph Editor with custom icon. Everytime user call GE, the orig GE doesn’t show but the Redux version instead. I did discuss this with my friends and they said we could find the mel file which with whatIs such as whatIs “layerEditor” and it will point to an actual MEL file where you can manipluate Maya layouts from starting point. I wasn’t into Mel so I don’t know how to but I guess you can check.
i’m still researching. i’m not really good at taking maya apart to check. although i can write basic scripts. but reading maya scripts is quite difficult for me .-.
It would be good if there was a sample script or a specific tutorial video.
but anyway thanks for everyone’s comments.