Atmospheric Effects Common Properties, Operators, and Methods

Atmospheric Effects 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>.numGizmos 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. .numGizmos 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.

EXAMPLE

   atmos = fire_effect density:20 outer_color:red
   appendGizmo atmos $SphereGizmo01

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> 
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.

In 3ds Max 6 and higher, Calling editAtmosphere() or editAtmospheric() without an argument will open the Environment dialog.

System Global Variables:

numAtmospherics 

This 3ds Max system global variable contains the number of atmospheric effects on the Effects list in the Environment And Effects Dialog. This variable is read-only.

Note:

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