Targetobject - superclass: GeometryClass; super-superclass:node - classID: #(4128, 0)
The generic target for cameras, spotlights etc.
There are no additional properties for TargetObject.
In MAXScript, you must explicitly construct a target for those objects that need one.
c = targetCamera pos:[x,y,z] target:(targetObject pos:[xt, yt, zt])
For historical reasons, the TargetObject's superclass is GeometryClass, but does not generate any actual geometry.
Since a taget object will be returned as part of the Lights or Cameras collections, it is important to filter the TargetObject out before performing any Light or Camera-specific operations!
for o in Lights where superclassof o != GeometryClass do
o.on = not o.on
--The above will toggle all lights on/off, skipping the targets.
--The following code does the same by checking the class,
--then assigns a random color to the light:
for o in Lights where classof o != TargetObject do
o.rgb = random black white
Similarly, when collecting geometry objects to perform mesh operations, the TagetObject should be explicitly filtered out to avoid errors due to its missing mesh,
for o in Geometry where classof o != TargetObject do
format "% - Vertices: %\n" o.name o.mesh.numverts
GeometryClass Common Properties, Operators, and Methods
Node Common Properties, Operators, and Methods
MAXWrapper Common Properties, Operators, and Methods
Value Common Properties, Operators, and Methods