pymel.core.uitypes.Window

Inheritance diagram of Window

class Window

class counterpart of mel function window

This command creates a new window but leaves it invisible. It is most efficient to add the window’s elements and then make it visible with the showWindow command. The window can have an optional menu bar. Also, the title bar and minimize/maximize buttons can be turned on or off. If the title bar is off, then you cannot have minimize or maximize buttons. Note: The window will require a control layout of some kind to arrange the controls (buttons, sliders, fields, etc.). Examples of control layouts are columnLayout, formLayout, rowLayout, etc. Note: This command will clear the uiTemplate stack. Templates for a window need to be set after the window cmd.

asQtObject(mayaName)

Given the name of a May UI control, return the corresponding QWidget. If the object does not exist, returns None

Note

Requires PyQt

backgroundColor(val=True, **kwargs)

The background color of the window. The arguments correspond to the red, green, and blue color components. Each component ranges in value from 0.0 to 1.0.

Derived from mel command maya.cmds.window

children()
delete()
getChildren()
getDocTag(**kwargs)

Attach a tag to the window.

Derived from mel command maya.cmds.window

getFrontWindow(**kwargs)

Return the name of the front window. Note: you must supply the name of any window (the window does not need to exist). Returns “unknown” if the front window cannot be determined.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.window

getHeight(**kwargs)

Height of the window excluding any window frame in pixels.

Derived from mel command maya.cmds.window

getIconName(**kwargs)

The window’s icon title. By default it is the same as the window’s title.

Derived from mel command maya.cmds.window

getIconify(**kwargs)

Icon state of the window.

Derived from mel command maya.cmds.window

getLeftEdge(**kwargs)

Position of the left edge of the window.

Derived from mel command maya.cmds.window

getMainWindow(**kwargs)

Main window for the application. The main window has an ‘Exit’ item in the Window Manager menu. By default, the first created window becomes the main window.

Derived from mel command maya.cmds.window

getMaximizeButton(**kwargs)

Turns the window’s maximize button on or off

Derived from mel command maya.cmds.window

getMenuArray(**kwargs)

Return a string array containing the names of the menus in the window’s menu bar.

Derived from mel command maya.cmds.window

getMenuBar(**kwargs)

Adds an empty menu bar to the window.

Derived from mel command maya.cmds.window

getMenuBarVisible(**kwargs)

Visibility of the menu bar (if there is one).

Derived from mel command maya.cmds.window

getMinimizeButton(**kwargs)

Turns the window’s minimize button on or off.

Derived from mel command maya.cmds.window

getNumberOfMenus(**kwargs)

Return the number of menus attached to the window’s menu bar.

Derived from mel command maya.cmds.window

getParent()
getResizeToFitChildren(**kwargs)

The window will always grow/shrink to just fit the controls it contains.

Derived from mel command maya.cmds.window

getSizeable(**kwargs)

Whether or not the window may be interactively resized.

Derived from mel command maya.cmds.window

getTitle(**kwargs)

The window’s title.

Derived from mel command maya.cmds.window

getTitleBar(**kwargs)

Turns the window’s title bar on or off.

Derived from mel command maya.cmds.window

getTitleBarMenu(**kwargs)

Controls whether the title bar menu exists in the window title bar. Only valid if -tb/titleBaris true. This Windows only flag is true by default.

Derived from mel command maya.cmds.window

getToolbox(**kwargs)

Makes this a toolbox style window. A Windows only flag that makes the title bar smaller and uses a slightly different display style.

Derived from mel command maya.cmds.window

getTopEdge(**kwargs)

Position of the top edge of the window.

Derived from mel command maya.cmds.window

getTopLeftCorner(**kwargs)

Position of the window’s top left corner.

Derived from mel command maya.cmds.window

getVisible(**kwargs)

The window’s visibility.

Derived from mel command maya.cmds.window

getWidth(**kwargs)

Width of the window excluding any window frame in pixels.

Derived from mel command maya.cmds.window

getWidthHeight(**kwargs)

Window’s width and height excluding any window frame in pixels.

Derived from mel command maya.cmds.window

layout()
menuIndex(val=True, **kwargs)

Sets the index of a specified menu.

Derived from mel command maya.cmds.window

minimizeCommand(val=True, **kwargs)

Script executed after the window is minimized (iconified).

Derived from mel command maya.cmds.window

parent()
restoreCommand(val=True, **kwargs)

Script executed after the window is restored from it’s minimized (iconified) state.

Derived from mel command maya.cmds.window

setDocTag(val=True, **kwargs)

Attach a tag to the window.

Derived from mel command maya.cmds.window

setHeight(val=True, **kwargs)

Height of the window excluding any window frame in pixels.

Derived from mel command maya.cmds.window

setIconName(val=True, **kwargs)

The window’s icon title. By default it is the same as the window’s title.

Derived from mel command maya.cmds.window

setIconify(val=True, **kwargs)

Icon state of the window.

Derived from mel command maya.cmds.window

setLeftEdge(val=True, **kwargs)

Position of the left edge of the window.

Derived from mel command maya.cmds.window

setMainWindow(val=True, **kwargs)

Main window for the application. The main window has an ‘Exit’ item in the Window Manager menu. By default, the first created window becomes the main window.

Derived from mel command maya.cmds.window

setMaximizeButton(val=True, **kwargs)

Turns the window’s maximize button on or off

Derived from mel command maya.cmds.window

setMenuBarVisible(val=True, **kwargs)

Visibility of the menu bar (if there is one).

Derived from mel command maya.cmds.window

setMinimizeButton(val=True, **kwargs)

Turns the window’s minimize button on or off.

Derived from mel command maya.cmds.window

setResizeToFitChildren(val=True, **kwargs)

The window will always grow/shrink to just fit the controls it contains.

Derived from mel command maya.cmds.window

setSizeable(val=True, **kwargs)

Whether or not the window may be interactively resized.

Derived from mel command maya.cmds.window

setTitle(val=True, **kwargs)

The window’s title.

Derived from mel command maya.cmds.window

setTitleBar(val=True, **kwargs)

Turns the window’s title bar on or off.

Derived from mel command maya.cmds.window

setTitleBarMenu(val=True, **kwargs)

Controls whether the title bar menu exists in the window title bar. Only valid if -tb/titleBaris true. This Windows only flag is true by default.

Derived from mel command maya.cmds.window

setToolbox(val=True, **kwargs)

Makes this a toolbox style window. A Windows only flag that makes the title bar smaller and uses a slightly different display style.

Derived from mel command maya.cmds.window

setTopEdge(val=True, **kwargs)

Position of the top edge of the window.

Derived from mel command maya.cmds.window

setTopLeftCorner(val=True, **kwargs)

Position of the window’s top left corner.

Derived from mel command maya.cmds.window

setVisible(val=True, **kwargs)

The window’s visibility.

Derived from mel command maya.cmds.window

setWidth(val=True, **kwargs)

Width of the window excluding any window frame in pixels.

Derived from mel command maya.cmds.window

setWidthHeight(val=True, **kwargs)

Window’s width and height excluding any window frame in pixels.

Derived from mel command maya.cmds.window

show()
window()

Previous topic

pymel.core.uitypes.Visor

Next topic

pymel.util

Core

Core Modules

Other Modules

This Page