Search code examples
pythonmayaautodeskmel

how to add maya outliner to tabLayout


I want to add maya outliner inside of the existing tabLayout

I came across a page that shows how to do it in MEL(the second method)

how would I do that in python ?

myOut= cmds.outlinerPanel()
cmds.control(edit=True,parent="outlinerLayout"  myOut)

the above gives syntax error, I guess I am doing it wrong in translating mel code to python code(i want in python coz the whole existing GUI app is done in python) and I want to implement the idea of having outliner tabbed into my project manager for the user removing the hassle of launching Outliner separately..


Solution

  • Lets say it's a coma error:

    myOut= cmds.outlinerPanel()
    cmds.control(myOut, edit=True, parent="outlinerLayout")
    

    Check out the Documentation:

    cmds.control

    cmds.outlinerPanel

    Anyewy I would Highly suggest you to use PyMel instead of maya python, it's a better pythonic way to code in Maya. And also PYQT4 will make UI build up easier.