Atmospheric Effects Common Properties, Operators, and Methods

Atmospherics have the following common properties and methods:

Properties

<atmos>.name         String       default: varies

The name as it appears in the Environment dialog list. The class name is used as the default name when no name: creation parameter is supplied.

<atmos>.numGizmo    Integer      -- read-only

The number of gizmos ever assigned to the atmospheric. A gizmo obtained via .getGizmo may be undefined, meaning a gizmo was added and then deleted. The atmospheric maintains an array of gizmos, and not every slot is necessarily in use. numGizmo is the size of the array, not the number of used slots.

Methods

isActive <atmos>

Returns true if the atmospheric is set to active; false otherwise.

getGizmo <atmos> <index_integer>

Retrieves the indexed gizmo node from the atmospheric. The gizmo node will be a light or atmospheric helper. The Index is 1-based.

deleteGizmo <atmos> <index_integer>

Deletes the indexed gizmo from the atmospheric.

appendGizmo <atmos> <node>

Appends the node to the gizmo list on the atmospheric. It must be of the right kind for the atmospheric, lights for volumeLights, helper gizmos for fire_effect, etc.

setActive <atmos> <boolean>

Sets the atmospheric active or inactive. If <boolean> is true the atmospheric is set to active; if false, inactive.

Associated Methods

You can use the following functions for maintaining the list of atmospherics in the global rendering environment:

addAtmospheric <atmos>

Appends the atmospheric to the Atmospheric Effects list

getAtmospheric <index_integer>

Retrieves the atmospheric at the indexed position in the Atmospheric Effects list. Index is 1-based.

setAtmospheric <index_integer> <atmos>

Sets the atmospheric at the indexed position in the Atmospheric Effects list to the specified atmospheric. If the Atmospheric Effects dialog is displayed when this method is called, the displayed Atmospheric Effects list is not updated.

deleteAtmospheric <index_integer>

Deletes the atmospheric at the indexed position in the Atmospheric Effects list. Index is 1-based.

editAtmosphere <atmos> <node>

Opens the Environment dialog, and opens the rollout for the specified atmospheric if it has been added to the Atmospheric Effects list. If the specified node is a gizmo for the atmospheric, that gizmo is selected in the atmospheric's gizmo list.

editAtmospheric <atmos> [ gizmo: <node> ]

Opens the Environment dialog, and opens the rollout for the specified atmospheric if it has been added to the Atmospheric Effects list. If the optional gizmo: argument is specified, and the specified node is a gizmo for the atmospheric, that gizmo is selected in the atmospheric's gizmo list.

The 3ds max global variable numAtmospherics gives you the number of current atmospherics in the rendering environment.

Notes

Unlike most MAXWrapper objects, you can not copy an Atmospheric.

See also

Example

atmos = fire_effect density:20 outer_color:red

appendGizmo atmos $SphereGizmo01