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.
MStatus setLayerClearDepthValue (unsigned int index, bool depth)
 This method sets the clearDepth attribute for the specified camera layer.
MStatus getLayerClearDepthValue (unsigned int index, bool &depth) const
 This method gets the clearDepth attribute value for the specified camera layer.
 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]objectThe MObject to attach the function set to
[out]ReturnStatusthe 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]objectThe MObject to attach the function set to
[out]ReturnStatusthe 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]returnStatusreturn 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]camListThe list of cameras or stereo rigs
[out]returnStatusreturn 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]nameThe name for the new cameraSet node
[out]returnStatusreturn 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]camListThe list of cameras or stereo rigs
[in]setListThe list of sets
[out]returnStatusreturn 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]nameThe name for the new cameraSet node
[in]camListThe list of cameras or stereo rigs
[in]setListThe list of sets
[out]returnStatusreturn 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]cameraThe camera or stereo rig for the layer
[in]setThe 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]cameraThe 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]indexThe index of the layer
[in]cameraThe camera for the layer
[in]setThe 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]indexThe index of the layer
[in]cameraThe camera for the layer
Returns:
Status Code
Status Codes:
MStatus deleteLayer ( unsigned int  index)

Deletes the layer denoted by the given index.

Parameters:
[in]indexThe 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]returnStatusThe 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]indexThe index of the layer
[in]cameraThe 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]indexThe index of the layer
[out]cameraThe 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]indexThe index of the layer
[in]setThe 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]indexThe index of the layer
[out]setThe 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]indexThe index of the layer
[in]isActiveWhether 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]indexThe index of the layer
[out]returnStatusThe 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]indexThe index of the layer
[in]orderThe order number
Returns:
Status Code
Status Codes:
MStatus getLayerOrder ( unsigned int  index,
int &  order 
)

Get the processing order of a particular layer.

Parameters:
[in]indexThe index of the layer
[out]orderThe 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]sortedIndicesThe sorted indices
Returns:
Status Code
Status Codes:
MStatus setLayerClearDepthValue ( unsigned int  index,
bool  depth 
)

This method sets the clearDepth attribute for the specified camera layer.

Parameters:
[in]indexThe index of the layer
[in]depthThe clear depth value
Returns:
Status Code
Status Codes:
MStatus getLayerClearDepthValue ( unsigned int  index,
bool &  depth 
) const

This method gets the clearDepth attribute value for the specified camera layer.

Parameters:
[in]indexThe index of the layer
[out]depthThe clear depth value
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