GetPrimCamera
 
 
 

GetPrimCamera

Description

Creates a camera primitive object with an interest.

Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference. Normally you can get the output arguments via either XSIApplication.ExecuteCommand method (C#) or the ISIVTCollection (scripting languages), but this command already returns a value.

The only available workaround in this case is to create a VBScript custom command which returns both the output arguments and the return value in one array. For details, see What Happens when the Function Already Returns a Value?.

Scripting Syntax

oReturn = GetPrimCamera( PresetObj, [Name], [Parent], [Primitive], [3DObjCamera], [3DObjCameraInterest] );

Return Value

Returns the camera root (a CameraRig object).

Parameters

Parameter Type Description
PresetObj String or a preset object (see SIGetPreset) Any preset for Camera Primitives
Name String Name of the camera.
Parent String Parent object for the camera.
Primitive Primitive Returns the camera primitive.
3DObjCamera Camera Returns the camera object.
3DObjCameraInterest Null Returns the camera interest object.

Examples

VBScript Example

GetPrimCamera "Camera", "MyCameraName"
dim root, prim, cam, interest   
set root = GetPrimCamera( "Camera", "Bob",, prim, cam, interest )
logmessage "root = " & root 
logmessage "prim = " & prim 
logmessage "cam  = " & cam 
if Not TypeName (interest) = "Nothing" then
        logmessage "int  = " & interest
end if

See Also

SIGetPrimCamera