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

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

Parameters

Parameter

Type

Description

PresetObj [in/out]

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 [out]

Primitive

Returns the camera primitive.

3DObjCamera [out]

Camera

Returns the camera object.

3DObjCameraInterest [out]

Null

Returns the camera interest object.

Return Value

Returns the camera root (a CameraRig 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



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index