This class inplements the generic target for cameras, spotlights etc.
Constructor:
targetObject...
Properties:
There are no additional properties for TargetObject.
Note
In MAXScript, you must explicitly construct a target for those objects that need one.
FOR EXAMPLE:
c = targetCamera pos:[x,y,z] target:(targetObject pos:[xt, yt, zt])
WARNING!
For historical reasons, the TargetObject's superclass is GeometryClass, but it does not generate any actual geometry!
Since a TagetObject will be returned as part of the Lights or Cameras collections, it is important to filter it out before
performing any Light or Camera-specific operations!
FOR EXAMPLE:
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 TargetObject should be explicitly filtered out
to avoid errors due to its missing mesh,
FOR EXAMPLE:
for o in Geometry where classofo != TargetObject do
format "% - Vertices: %\n" o.name o.mesh.numverts