# MGlobal

MGlobal is currently a stub which only implements a small portion of the class's total functionality.

## Base Class

None.

## Constants

Name | Type | Description
--- | --- | ---
Maya States
kInteractive | int | Running with a UI.
kBatch | int | Running without a UI.
kLibraryApp | int | Running as standalone (MLibrary) application.
kBaseUIMode | int | Running with UI functionality enabled but Maya's standard UI startup scripts are not run. Allows users to provide their own UI.
List Adjustment Modes
kReplaceList | int | Totally replace the list with the given items.
kXORWithList | int | Any of the items which are already on the list will be removed. Any which are not already on the list will be added to the end of the list.
kAddToList | int | Add the items to the end of the list.
kRemoveFromList | int | Remove the items from the list.
kAddToHeadOfList | int | Add the items to the beginning of the list.
Selection Methods
kSurfaceSelectMethod | int | Select based on the surface of the objects.
kWireframeSelectMethod | int | Select based on the wireframe of the objects.
Selection Modes
kSelectObjectMode | int | Select objects.
kSelectComponentMode | int | Select components.
kSelectRootMode | int | Select DAG roots.
kSelectLeafMode | int | Select DAG leaves.
kSelectTemplateMode | int | Select templated objects.

## Static Methods

Name | Parameters | Returns | Description
--- | --- | --- | ---
Available in Maya 2012 Gold:
getActiveSelectionList() |  | MSelectionList | Returns a copy of the active selection list.
Available in Maya 2012 HotFix 1:
displayError(msg) | msg - string |  | Display an error in the script editor.
displayInfo(msg) | msg - string |  | Display an informational message in the script editor.
displayWarning(msg) | msg - string |  | Display a warning in the script editor.
getFunctionSetList(object) | object - MObject | tuple of strings | Returns a tuple of strings that represent the type of each function set that will accept this object.
getSelectionListByName(name) | name - string | MSelectionList | Returns a selection list with all of the objects that match the specified name. The name may use the same type of regular expressions as can be used in MEL commands. For example, the pattern "pCube*" will match all occurrences of objects whose names begin with "pCube".

## Constructors

MGlobal is a pure static class. It cannot be instantiated and therefore has no constructors.

## Virtual Methods

None.

## Object Methods

None.

## Object Attributes

None.

## Sequence Support

None.

## Number Support

None.

## Comparison Support

None.

## str() Support

Not applicable as the class cannot be instantiated.

## repr() Support

Not applicable as the class cannot be instantiated.

© 2011 Autodesk, Inc. All rights reserved.