The globalVars struct provides methods to collect, create, test and remove global variables.
These methods are available in 3ds Max 2008 and higher.
They were previously available in the Avguard Extensions.
Returns the value of the specified global variable.
The argument must be a MAXScript name value.
The global variable name must exist, otherwise a runtime error will be generated.
Sets the value of the specified global variable.
The argument must be a MAXScript name value.
The global variable name must exist, otherwise a runtime error will be generated.
Returns an array of all global variable names declared in the current session.
NEW in 3ds Max 2017: The optional filter parameter is a two argument function that returns either true
or false. The first argument is the global variable's name, and the second argument
is the global variable's value. If the filter function returns true, the variable
is gathered.
FOR EXAMPLE: |
ro_controls = globalvars.gather filter:(fn filterfn n v = (iskindof v rolloutcontrol)) |
Returns true if the specified variable name is global, false if it is not global or not declared.
Returns the type of the global variable as an integer or name value.
The specified global variable name must exist.
This method is mainly for internal testing.
The primary type tag values are:
Returns the type of the value in the global variable as an integer or name value.
The specified global variable name must exist.
This method is mainly for internal testing.
Each value type has its own tag value.
Removes the specified variable name from the list of global variables.