Skip to content

Instantly share code, notes, and snippets.

@theodox
Last active August 29, 2015 13:57
Show Gist options
  • Save theodox/9716634 to your computer and use it in GitHub Desktop.
Save theodox/9716634 to your computer and use it in GitHub Desktop.
from mGui.gui import *
# note the caps: all of these are wrapper objects, not maya.cmds!
window = Window('main window', title="How's this")
with ColumnLayout('gui', width = 256) as gui:
with FrameLayout("t_buttons", label = "buttons column"):
with ColumnLayout("col"):
Button('mkSphere', label = "Make Sphere")
Button('mkCone', label ="Make Cone")
Button('mkCube', label ="Make Cube")
with FrameLayout("r_buttons", label = "buttons row"):
with RowLayout ("row", numberOfColumns=3):
Button('mkSphere', label = "Make Sphere")
Button('mkCone', label ="Make Cone")
Button('mkCube', label ="Make Cube")
with FrameLayout("g_buttons", label = "buttons grid"):
with GridLayout("grid", numberOfColumns = 2):
Button('mkSphere', label = "Make Sphere")
Button('mkCone', label ="Make Cone")
Button('mkCube', label ="Make Cube")
Button('mkCircle', label = "Make Circle")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment