Public Member Functions | Protected Member Functions

MFnCameraSet Class Reference

Search for all occurrences

Detailed Description

Camera set node function set.

MFnCameraSet is the function set that is used for manipulating cameraSet nodes.

A cameraSet node defines a list of camera layeres to be processed in order, defining a multi-layer viewing of the scene. A camera layer consists of an object set to be used by the layer, and a camera through which the set is viewed. Individual layers may be marked active or inactive and ordered arbitrarily.

#include <MFnCameraSet.h>

Inheritance diagram for MFnCameraSet:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual MFn::Type  type () const
  Function set type.
virtual  ~MFnCameraSet ()
  Destructor.
  MFnCameraSet ()
  Default constructor.
  MFnCameraSet (MObject &object, MStatus *ReturnStatus=NULL)
  Constructor.
MObject  create (MStatus *ReturnStatus=NULL)
  Creates a new cameraSet dependency node and puts it in the dependency graph.
MObject  create (const MDagPathArray &camList, MStatus *returnStatus=NULL)
  Creates a new cameraSet dependency node and puts it in the dependency graph.
MObject  create (const MString &name, MStatus *ReturnStatus=NULL)
  Creates a new cameraSet dependency node and puts it in the dependency graph.
MObject  create (const MDagPathArray &camList, const MObjectArray &setList, MStatus *returnStatus=NULL)
  Creates a new cameraSet dependency node and puts it in the dependency graph.
MObject  create (const MString &name, const MDagPathArray &camList, const MObjectArray &setList, MStatus *returnStatus=NULL)
  Creates a new cameraSet dependency node and puts it in the dependency graph.
MStatus  appendLayer (const MDagPath &camera, const MObject &set)
  Appends a layer to the associated cameraSet node.
MStatus  appendLayer (const MDagPath &camera)
  Appends a layer to the associated cameraSet node using the given camera.
MStatus  insertLayer (unsigned int index, const MDagPath &camera, const MObject &set)
  Inserts a layer at the given index to the associated cameraSet node using the given camera.
MStatus  insertLayer (unsigned int index, const MDagPath &camera)
  Inserts a layer at the given index to the associated cameraSet node using the given camera.
MStatus  deleteLayer (unsigned int index)
  Deletes the layer denoted by the given index.
MStatus  clear ()
  Clear all of the camera layers.
unsigned int  getNumLayers (MStatus *returnStatus=NULL)
  Return the number of layers in the cameraSet.
MStatus  setLayerCamera (unsigned int index, const MDagPath &camera)
  Set the camera to be used for a particular layer.
MStatus  getLayerCamera (unsigned int index, MDagPath &camera)
  Get the camera used for a particular layer.
MStatus  setLayerSceneData (unsigned int index, const MObject &set)
  Set the scene data to be used for a particular layer.
MStatus  getLayerSceneData (unsigned int index, MObject &set)
  Get the scene data used for a particular layer.
MStatus  setLayerActive (unsigned int index, bool isActive)
  Set a particular layer to be active.
bool  isLayerActive (unsigned int index, MStatus *returnStatus=NULL)
  Get whether a particular layer is active.
MStatus  setLayerOrder (unsigned int index, int order)
  Set the processing order of a particular layer.
MStatus  getLayerOrder (unsigned int index, int &order)
  Get the processing order of a particular layer.
MStatus  getSortedIndices (MUintArray &sortedIndices)
  Get a list of the layer indices, sorted by the order attribute.
  MFnCameraSet (const MObject &object, MStatus *ReturnStatus=NULL)
  Constructor.

Protected Member Functions

virtual const char *  className () const
  Class name.

Constructor & Destructor Documentation

MFnCameraSet ( MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in] object The MObject to attach the function set to
[out] ReturnStatus the return status
Status Codes:
MFnCameraSet ( const MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in] object The MObject to attach the function set to
[out] ReturnStatus the return status
Status Codes:

Member Function Documentation

MFn::Type type ( ) const [virtual]

Function set type.

Return the class type : MFn::kCameraSet.

Reimplemented from MFnDependencyNode.

const char * className ( ) const [protected, virtual]

Class name.

Return the class name : "MFnCameraSet".

Reimplemented from MFnDependencyNode.

MObject create ( MStatus returnStatus = NULL )

Creates a new cameraSet dependency node and puts it in the dependency graph.

Parameters:
[out] returnStatus return status
Returns:
A pointer to the new cameraSet node object.
Status Codes:
MObject create ( const MDagPathArray camList,
MStatus returnStatus = NULL 
)

Creates a new cameraSet dependency node and puts it in the dependency graph.

The method takes a list of cameras and creates a camera layer for each corresponding camera. Sets are not connected.

Parameters:
[in] camList The list of cameras or stereo rigs
[out] returnStatus return status
Returns:
A pointer to the new cameraSet node object.
Status Codes:
MObject create ( const MString name,
MStatus returnStatus = NULL 
)

Creates a new cameraSet dependency node and puts it in the dependency graph.

Parameters:
[in] name The name for the new cameraSet node
[out] returnStatus return status
Returns:
A pointer to the new cameraSet node object.
Status Codes:

Reimplemented from MFnDependencyNode.

MObject create ( const MDagPathArray camList,
const MObjectArray setList,
MStatus returnStatus = NULL 
)

Creates a new cameraSet dependency node and puts it in the dependency graph.

The method takes a list of cameras and object sets and creates a camera layer for each corresponding camera and object set.

Parameters:
[in] camList The list of cameras or stereo rigs
[in] setList The list of sets
[out] returnStatus return status
Returns:
A pointer to the new cameraSet node object.
Status Codes:
MObject create ( const MString name,
const MDagPathArray camList,
const MObjectArray setList,
MStatus returnStatus = NULL 
)

Creates a new cameraSet dependency node and puts it in the dependency graph.

The method takes a list of cameras and object sets and creates a camera layer for each corresponding camera and object set.

Parameters:
[in] name The name for the new cameraSet node
[in] camList The list of cameras or stereo rigs
[in] setList The list of sets
[out] returnStatus return status
Returns:
A pointer to the new cameraSet node object.
Status Codes:
MStatus appendLayer ( const MDagPath camera,
const MObject set 
)

Appends a layer to the associated cameraSet node.

The given camera and object set are used in the layer. If MObject::kNullObj is passed as the set, then the whole scene will be rendered in the layer.

Parameters:
[in] camera The camera or stereo rig for the layer
[in] set The set of objects used in the layer
Returns:
Status Code
Status Codes:
  • MS::kSuccess operation successful
  • MS::kInvalidObjectType camera and/or set incorrectly specified
MStatus appendLayer ( const MDagPath camera )

Appends a layer to the associated cameraSet node using the given camera.

The whole scene will be used with this layer as no object set is provided.

Parameters:
[in] camera The camera or stereo rig for the layer
Returns:
Status Code
Status Codes:
  • MS::kSuccess operation successful
  • MS::kInvalidObjectType camera and/or set incorrectly specified
MStatus insertLayer ( unsigned int  index,
const MDagPath camera,
const MObject set 
)

Inserts a layer at the given index to the associated cameraSet node using the given camera.

The index value must be in the range from 0 to the number of layers currently defined. The given camera and object set are used in the layer. If MObject::kNullObj is passed as the set, then the whole scene will be rendered in the layer.

Parameters:
[in] index The index of the layer
[in] camera The camera for the layer
[in] set The set of objects used in the layer
Returns:
Status Code
Status Codes:
MStatus insertLayer ( unsigned int  index,
const MDagPath camera 
)

Inserts a layer at the given index to the associated cameraSet node using the given camera.

The index value must be in the range from 0 to the number of layers currently defined. The whole scene will be used with this layer as no object set is provided.

Parameters:
[in] index The index of the layer
[in] camera The camera for the layer
Returns:
Status Code
Status Codes:
MStatus deleteLayer ( unsigned int  index )

Deletes the layer denoted by the given index.

Parameters:
[in] index The index of the layer
Returns:
Status Code
Status Codes:
MStatus clear ( )

Clear all of the camera layers.

Returns:
Status Code
Status Codes:
unsigned int getNumLayers ( MStatus returnStatus = NULL )

Return the number of layers in the cameraSet.

Parameters:
[out] returnStatus The return status
Returns:
The number of layers
Status Codes:
MStatus setLayerCamera ( unsigned int  index,
const MDagPath camera 
)

Set the camera to be used for a particular layer.

Parameters:
[in] index The index of the layer
[in] camera The camera for the layer
Returns:
Status Code
Status Codes:
MStatus getLayerCamera ( unsigned int  index,
MDagPath camera 
)

Get the camera used for a particular layer.

Parameters:
[in] index The index of the layer
[out] camera The camera for the layer
Returns:
Status Code
Status Codes:
MStatus setLayerSceneData ( unsigned int  index,
const MObject set 
)

Set the scene data to be used for a particular layer.

Parameters:
[in] index The index of the layer
[in] set The object set for the layer
Returns:
Status Code
Status Codes:
MStatus getLayerSceneData ( unsigned int  index,
MObject set 
)

Get the scene data used for a particular layer.

The returned scene data could be MObject::kNullObj if no scene data has been set. The operation will still be deemed successful.

Parameters:
[in] index The index of the layer
[out] set The object set for the layer
Returns:
Status Code
Status Codes:
MStatus setLayerActive ( unsigned int  index,
bool  isActive 
)

Set a particular layer to be active.

Parameters:
[in] index The index of the layer
[in] isActive Whether the layer should be processed
Returns:
Status Code
Status Codes:
bool isLayerActive ( unsigned int  index,
MStatus returnStatus = NULL 
)

Get whether a particular layer is active.

Parameters:
[in] index The index of the layer
[out] returnStatus The return status
Returns:
Whether the layer is being processed
Status Codes:
MStatus setLayerOrder ( unsigned int  index,
int  order 
)

Set the processing order of a particular layer.

Parameters:
[in] index The index of the layer
[in] order The order number
Returns:
Status Code
Status Codes:
MStatus getLayerOrder ( unsigned int  index,
int &  order 
)

Get the processing order of a particular layer.

Parameters:
[in] index The index of the layer
[out] order The processing order
Returns:
Status Code
Status Codes:
MStatus getSortedIndices ( MUintArray sortedIndices )

Get a list of the layer indices, sorted by the order attribute.

Parameters:
[out] sortedIndices The sorted indices
Returns:
Status Code
Status Codes:

MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet
MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet MFnCameraSet