AttachExtraCamera

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Attaches an extra scene camera at the specified NiNode of the calling reference's loaded 3D model. The scene, as viewed from the camera, can then be projected onto either another model block, or an image-type UI tile, using ProjectExtraCamera.

The function takes 3 arguments, as follows:

  • cameraName - Any unique name that will be used for identifying and referencing the camera.
  • addOrRemove - Pass 1 to attach, or 0 to remove the camera.
  • parentNode - A name (case-sensitive) of a NiNode in the calling reference's 3D model, to which the camera will be attached.

Notes

  • The camera's XYZ position/rotation can be modified using SetNifBlockTranslation / SetNifBlockRotation (the block name is the camera name).
  • If the camera was successfully attached, the function returns 1 (otherwise, 0).
  • The function will fail if the calling reference's 3D model isn't loaded.
  • The camera will be removed, a) if the calling reference's 3D is un(re)loaded, or b) when loading a game.
  • This function should be considered EXPERIMENTAL, and may change considerably (or be scrapped, altogether) in the future.

Syntax

[help]
(successful:0/1) reference.AttachExtraCamera cameraName:string addOrRemove:1/0 parentNode:string

Example

set bAttached to objectRef.AttachExtraCamera "mySnigCam" 1 "SnigCamNode"
objectRef.AttachExtraCamera "mySnigCam" 0 

See Also