General Node Properties

All the properties listed here are accessible on any node subclass. Unless otherwise noted, these properties can not be animated.

<node>.name                      String               default: varies

Get or set the scene object's name.

<node>.baseObject                A subclass of Node   default: varies  -- read-only

Retrieve the base object in a scene node. This has relevance in nodes that have modifiers present that change the node type as it is processed up the stack. For example, a line with an extrude modifier starts out as a Shape and turns into an Editable Mesh at the top of the stack, its so-called world state. The baseObject property gives you access to the base object in the modifier stack. Because the classOf() function on scene node objects returns the class of the world state object (the top of the stack), you can use the baseObject property to determine the class of the original object used to create the node. This property is read-only.

<node>.material                  Material             default: undefined

Get or set the object's material.

<node>.parent                    Node                 default: undefined

Get or set the parent of the object. If the object is a top-level object, accessing the parent property will return undefined. For example,

foo_mom = $foo.parent

$foo.parent = $baz

Setting the this property has the effect of detaching <node> from its original parent and attaching it as a child of the specified node.

You can detach an object and make it a top-level object by assigning undefined to the parent property:

$foo.parent = undefined

<node>.children                  NodeChildrenArray    default: undefined

This yields a special array subclass, NodeChildrenArray. See NodeChildrenArray Values. A NodeChildrenArray can be accessed using normal MAXScript array indexing and can be sequenced over in a for loop or with collection-mapped functions, for example:

c = $foo.children[i]

move $foo.children [10,10,10]

for c in $baz.children do print c

You can get the number of children via the count property:

num_children = $foo.children.count

You cannot directly set a child by indexing into NodeChildrenArray, but you can append new children using the append() function and delete children using the deleteItem() function:

$foo.children[$foo.children.count+1]=$baz -- does not work

append $foo.children $baz -- works

deleteItem $foo.children $baz -- removes $baz as child

The ordering of child indexes corresponds to the ordering shown in the 3ds max hierarchy view, which is the order in which the children were added to the parent.

<node>.mesh                      TriMesh

For scene nodes or base objects that are Editable Mesh objects, or are convertable to Editable Mesh objects, this property yields a TriMesh containing a copy of the source object's mesh after any modifiers have been applied, but before any space warps have been applied. This property is read-only unless the scene node or base object is an Editable Mesh object, in which case the specified TriMesh replaces the base object. See Editable_Mesh : GeometryClass and TriMesh : Value for more information on TriMesh and Editable Mesh.

Target/LookAt Related Properties

<node>.isTarget                  Boolean              default: false

Returns true if then node is the target of another object's LookAt controller, false if it is not. If the object is the automatically created target object of a light's or camera's LookAt controller, and you set this property to false, you can delete the target object without causing the light or target to be deleted.

<node>.lookAt                    Node                 default: undefined

Get a node that is looking at <node>, or set a node to look at <node>. This is the converse of the <node>.target property. If <node> is not the target of some object's LookAt controller, the value undefined is returned. If <node> is the target of more than one object, only one such object is returned. If this property is used to set <node> as the target of another object, a LookAt controller is automatically assigned to that object.

<node>.target                    Node                 default: undefined

Get or set the target node for <node>'s LookAt controller. Returns undefined if there is no target or the node does not have a LookAt controller. If this property is used to set an object as the target of <node>, a LookAt controller is automatically assigned to <node>. Exercise care if you assign a node to the target property. When you specify a target object, 3ds max stores with the target object the last object it was assigned as a target of. If you delete the target object, the behavior of 3ds max is to also delete the object looking at it. If the target object is a targetobject class object, deleting an object looking at it will also delete the target object, even if another object is also looking at it.

<node>.targetDistance            Float                default: undefined

Get or set the distance from the node to its target. Returns undefined if <node> does not have a target. Setting this property moves the target along the object-to-target vector to the distance specified. For example,

$spot01.targetDistance

$cam2.targetDistance = 100

Viewport Related Properties

<node>.isSelected                Boolean              default: false

Get or set whether the node is selected.

<node>.isHidden                  Boolean              default: false

Get or set whether the node is flagged as hidden in the viewports. A node may be hidden even if this property is false. If the node's category is marked as hidden in the Hide by Category rollout in the Display panel, or if the node is flagged as frozen and Hide Frozen Objects is on in the Hide rollout in the Display panel, the node will be hidden regardless of this property's value.

<node>.xray                      Boolean              default: false

Get or set whether the node is displayed in See Through mode in shaded viewports.

<node>.ignoreExtents             Boolean              default: false

Get or set whether the extents of the node is ignored when performing a zoom extents.

<node>.boxMode                   Boolean              default: false

Get or set whether the node is displayed in box mode in the viewports.

<node>.allEdges                  Boolean              default: false

Get or set whether all the node's edges are displayed in the viewports.

<node>.backFaceCull              Boolean              default: false

Get or set whether the node's back faces are culled (not displayed) in the viewports.

<node>.wireColor                 Color                default: random color

Get or set the node's wireframe color

<node>.showLinks                 Boolean              default: false

Get or set whether to display a wireframe representation of the hierarchical link(s) from the node to its children.

<node>.showLinksOnly             Boolean              default: false

Get or set whether to display only the wireframe representation of the hierarchical link(s) for the node. Setting this property to true also sets showLinks to true.

<node>.isFrozen                  Boolean              default: false

Get or set whether the node is frozen in the viewports.

<node>.showTrajectory            Boolean              default: false

Get or set whether the node's trajectory is displayed in the viewports.

<node>.showVertexColors          Boolean              default: false

Get or set whether to display the effect of assigned vertex colors for the node in shaded viewports.

<node>.vertexColorsShaded        Boolean              default: false

Get or set whether the vertex color display for the node is shaded in the viewports. When true, the colors are unshaded and appear in their pure RGB values. When false, the colors appear like any other assigned color in the viewports.

<node>.isDependent               Boolean              default: false

Returns true if the node has its dependent flag set, otherwise returns false. A node is dependent in the sense of 3ds max's Views/Show Dependencies mode. When the Modify panel is open, Show Dependencies will show all the nodes that are dependent on the current modifier or object being editing by highlighting them in green, and the dependent flag for the node is set. This property will always return false if the Modify panel is closed, or if Views/Show Dependencies is off. This property is read-only.

Rendering Related Properties

<node>.castShadows               Boolean              default: true

Get or set whether the node casts shadows when rendered. This property parallels the Cast Shadows property in an object's right-click Object Properties dialog.

<node>.receiveShadows            Boolean              default: true

Get or set whether the node casts shadows when rendered. This property parallels the Receive Shadows property in an object's right-click Object Properties dialog.

<node>.gbufferChannel            Integer              default: 0

Get or set the node's g-buffer Object ID channel value. Valid object ID values in 3ds max range from 0 to 65535. This property parallels the G-Buffer Object Channel property in an object's right-click Object Properties dialog.

<node>.visibility                Boolean              default: true  -- animatable

This is a boolean property (unlike its value as a signed float in the 3ds max Track View) - true or on denotes visible, false or off invisible. Animate this property to control an node's visibility at render-time, for example:

animate on

(

at time 0 $foo.visibility = on

at time 35 $foo.visibility = off

at time 57 $foo.visibility = on

)

The controller for this property is stored in the 1st subAnim of the node. You can access this controller as:

<node>[1].controller -- the visibility controller

You can also get a node's visibility controller using the getVisController() method.

<node>.inheritVisibility         Boolean              default: true

Get or set whether the node inherits the visibility of its parent object (if any). This property parallels the Inherit Visibility property in an object's right-click Object Properties dialog.

<node>.renderable                Boolean              default: true

Get or set whether the node is renderable.

<node>.renderOccluded            Boolean              default: false

Get or set whether to Render Occluded Objects behind the node. This property parallels the Render Occluded Objects property in an object's right-click Object Properties dialog.

<node>.motionBlurOn              Boolean              default: true

Get or set whether motion blur is enabled for the object. This property parallels the Motion Blur Enabled property in an object's right-click Object Properties dialog.

<node>.motionBlurOnController    Controller           default: undefined

Get or set the motion blur on/off controller used for the node.

<node>.motionBlur                Name                 default: #none

Get or set the type of motion blur to be used for the node. Valid parameter values are: #none, #object, and #image. For backward compatibility, this property can also be set to false for none or true for object motion blur. This property parallels the Motion Blur type specified in an object's right-click Object Properties dialog.

<node>.imageMotionBlurMultiplier Float                default: 1.0  -- animatable

Get or set the node's image motion blur multiplier value. The controller for this property is stored in the 6th subAnim of the node. You can access this controller as:

<node>[6].controller -- the imageMotionBlurMultiplier controller

You can also get and set a node's imageMotionBlurMultiplier controller using the getImageBlurMultController() and setImageBlurMultController() methods.

<node>.rcvcaustics               Boolean              default: true

Get or set whether the node receives caustics. Caustics are not supported by the 3ds max scanline renderer.

<node>.generatecaustics          Boolean              default: false

Get or set whether the node generates caustics. Caustics are not supported by the 3ds max scanline renderer.

<node>.rcvGlobalIllum            Boolean              default: true

Get or set whether the node receives global illumination. Global illumination is not supported by the 3ds max scanline renderer.

<node>.generateGlobalIllum       Boolean              default: false

Get or set whether the node generates global illumination. Global illumination is not supported by the 3ds max scanline renderer.