Go to: Synopsis. Return value. MEL
examples.
uiRes(string $lookUpKey)
Lookup the given resource ID, $lookThisUp, in the MEL resource
catalog. The MEL resource catalog is built up from a series of
displayString commands that associate each resource ID "key" with a
value. Lookup keys must be unique. They are formed like this:
[prefix_]stringSetName.resourceName where "prefix" is an optional
single character origin code, joined to the stringSetName by an
underscore. Maya follows the convention: "m" for MEL files "n" for
node/attribute names "s" for command message strings "p" for
plug-in strings The "resource name" is a string identifier that
describes the look-up value. The "string set" name refers to the
origin of the resource.
None
Variable Name |
Variable Type |
Description |
$lookUpKey |
string |
Unique key ID for catalog lookup |
// Query the value of the "kBakeSimulation" resource,
// found in the Edit menu. The resource name is
// "kBakeSimulation", the string set name is the name
// of the MEL file the resource comes from (without the
// .mel extension: buildEditMenu), and the prefix for MEL
// resources is "m_".
//
uiRes( "m_buildEditMenu.kBakeSimulation" );
// Result: Bake Simulation