X3DObject.AddCamera

Description

Creates a new Camera object given a camera preset name/object. An interest is also created as a sibling of the new camera. The new camera object is parented under this X3DObject.

Note: This method only creates a Camera object and its interest, whereas X3DObject.AddCameraRig creates a camera root object with the camera and its interest as children.

Scripting Syntax

oReturn = X3DObject.AddCamera( Preset, [Name] );

Return Value

Camera

Parameters

Parameter Type Description
Preset Camera Primitive Preset Preset for type of camera

Possible Values:

Description:

Camera Perspective camera
Orthographic Orthographic camera
Telephoto Telephoto camera
Wide_Angle Wide angle camera
Name String Name of new Camera

Examples

VBScript Example

set oRoot = Application.ActiveProject.ActiveScene.Root
set oCam = oRoot.AddCamera( "Camera", "MyCamera" )