## DirectedObject

Object Hierarchy | Related C++ Class: Directed

### Inheritance

SIObject

ProjectItem

SceneItem

X3DObject

DirectedObject

### Introduced

v1.0

### Description

An object representing the interest of a Camera or Light. A DirectedObject cannot be created directly, it acts as a base class for Camera and Light objects.

### Methods

Add2DChain | Add3DChain | AddAnnotation | AddCamera
AddCameraRig | AddChild | AddControl | AddCustomOp
AddCustomProperty | AddFxTree | AddGeometry | AddICEAttribute
AddLattice | AddLight | AddLightRig | AddMaterial
AddModel | AddNull | AddNurbsCurve | AddNurbsCurveList
AddNurbsCurveList2 | AddNurbsSurface | AddNurbsSurfaceMesh | AddNurbsSurfaceMesh2
AddPolygonMesh | AddPrimitive | AddProperty | AddScriptedOp
AddScriptedOpFromFile | AnimatedParameters2 | ApplyEnvelope | BelongsTo
EvaluateAt | FindChild | FindChild2 | FindChildren
FindChildren2 | GetActivePrimitive2 | GetActivePrimitive3 | GetBoundingBox
GetICEAttributeFromName | GetLocalPropertyFromName | GetLocalPropertyFromName2 | GetModels2
GetPropertyFromName | GetPropertyFromName2 | GetStaticKinematicState | HasStaticKinematicState
IsA | IsAnimated2 | IsClassOf | IsEqualTo
IsKindOf | IsLocked | IsNodeAnimated | IsSelected
LockOwners | NodeAnimatedParameters | RemoveChild | RemoveFromParent
RemoveICEAttribute | SetAsSelected | SetCapabilityFlag | SetLock
SetMaterial | ShapeAnimatedClusters | TaggedParameters | UnSetLock

### Properties

ActivePrimitive | Application | BranchFlag | Capabilities
Categories | Children | Envelopes | EvaluationID
Families | FullName | Help | HierarchicalEvaluationID
ICEAttributes | Interest | Kinematics | LocalProperties
LocalRotation | LocalScaling | LocalTranslation | LockLevel
LockMasters | LockType | Material | Materials
Model | Models | Name | NestedObjects
ObjectID | Origin | OriginPath | Owners
PPGLayout | Parameters | Parent | Parent3DObject
Primitives | Properties | Selected | Type

### Examples

#### 1. JScript Example

    NewScene( null, false );
    var oRoot = Application.ActiveProject.ActiveScene.Root;
    var oSpot = oRoot.AddLight( "Spot", true ,"MySpotLight" );
    var oInterest1 = oSpot.Interest;
    Application.LogMessage( "original interest: " + oInterest1 );
    var cone3DObj = oRoot.AddGeometry( "Cone", "MeshSurface" );
    oSpot.Interest = cone3DObj;
    var oInterest2 = oSpot.Interest;
    Application.LogMessage( "new interest: " + oInterest2 );
    // Expected results:
    //INFO : original interest: SpotInterest
    //INFO : new interest: cone

#### 2. Python Example

    app = Application
    app.NewScene( "", 0 )
    root = Application.ActiveProject.ActiveScene.Root
    spot = root.AddLight( "Spot", True ,"MySpotLight" )
    intrst1 = spot.Interest
    app.LogMessage( "interest: " + intrst1.Name )
    cone3DObj = root.AddGeometry( "Cone", "MeshSurface" )
    spot.Interest = cone3DObj
    intrst2 = spot.Interest
    app.LogMessage( "new interest: " + intrst2.Name )
    # Expected results:
    #INFO : interest: SpotInterest
    #INFO : new interest: cone

#### 3. VBScript Example

    NewScene , false
    set oRoot = Application.ActiveProject.ActiveScene.Root
    set oSpot = oRoot.AddLight( "Spot", True ,"MySpotLight" )
    set oInterest = oSpot.Interest
    Application.LogMessage "interest: " & oInterest
    set cone3DObj = SIGetPrim("Cone").value("Value")
    SIConvert "MeshSurface", cone3DObj
    oSpot.Interest = cone3DObj
    set oInterest = oSpot.Interest
    Application.LogMessage "new interest: " & oInterest
    ' Expected results:
    'INFO : interest: SpotInterest
    'INFO : new interest: cone

### See Also

SpotLight Camera