Predefined Globals

The predefined global variables contain special values that are frequently used in scripts. These variables are read-only.

true, false

Boolean values. Can be used for testing the results of comparisons and for state tests.

on, off

Synonyms for true and false , sometimes easier to read in state accesses.

pi, e

Float values that contain the standard mathematical constants' values. They are equivalent to 3.1415926535 and 2.718281828, respectively.

red, green, blue, white, black, orange, yellow, brown, gray 

A predefined set of useful Color values.

x_axis, y_axis, z_axis

Point3 values that define normal vectors for the 3 major axes. They are equivalent to [1, 0, 0], [0, 1, 0], and [0, 0, 1], respectively.

ok

A void value returned by some functions or expressions that don’t have a meaningful value to return.

undefined

The initial value of all variables and array elements. MAXScript generates an error if you try to perform any operation on the undefined value, except for checking to see if some value is equal to it or not:

if a == undefined then print "oh, oh"
if b != undefined then print "whew!"
unsupplied

The initial value of all function keyword arguments. Keyword arguments are optional arguments to functions. If a keyword argument is not supplied by the function caller and the function definition does not specify a default value, MAXScript initializes the keyword argument to *unsupplied* . You can test for this value to see whether a caller has supplied a particular keyword. For more details, see Function Calls.

dontcollect

This value is used in for loops to signal that the value is not to be collected. See For Loop for details.

silentValue

Holds a void value that is not printed to the Listener. Available in 3ds Max 2019.2 Update and higher. Previously, this global was called noValue. This global variable holds an instance of noValueClass. This variable supports the setListenerSel() method, which does not output the return value to the Listener to avoid replacing the text just selected by the method.