- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnCameraSet Class Reference
OpenMaya - API module for common classes | FunctionSet classes

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:
[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] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

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:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

## Member Function Documentation

MFn::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Function set type.

Return the class type : MFn::kCameraSet.

Reimplemented from MFnDependencyNode.

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

Search for all occurrences

Class name.

Return the class name : "MFnCameraSet".

Reimplemented from MFnDependencyNode.

MObject create | ( | MStatus * | returnStatus = `NULL` | ) |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kLicenseFailure application not licensed for attempted operation
  - MS::kInsufficientMemory out of memory

MObject create | ( | const MDagPathArray & | camList,
|  | MStatus * | returnStatus = `NULL`
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kLicenseFailure application not licensed for attempted operation
  - MS::kInsufficientMemory out of memory

MObject create | ( | const MString & | name,
|  | MStatus * | returnStatus = `NULL`
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kLicenseFailure application not licensed for attempted operation
  - MS::kInsufficientMemory out of memory

Reimplemented from MFnDependencyNode.

MObject create | ( | const MDagPathArray & | camList,
|  | const MObjectArray & | setList,
|  | MStatus * | returnStatus = `NULL`
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kLicenseFailure application not licensed for attempted operation
  - MS::kInsufficientMemory out of memory

MObject create | ( | const MString & | name,
|  | const MDagPathArray & | camList,
|  | const MObjectArray & | setList,
|  | MStatus * | returnStatus = `NULL`
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kLicenseFailure application not licensed for attempted operation
  - MS::kInsufficientMemory out of memory

MStatus appendLayer | ( | const MDagPath & | camera,
|  | const MObject & | set
| ) |  |

Search for all occurrences

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 | ) |

Search for all occurrences

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
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kInvalidObjectType camera and/or set incorrectly specified

MStatus insertLayer | ( | unsigned int | index,
|  | const MDagPath & | camera
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kInvalidObjectType camera and/or set incorrectly specified

MStatus deleteLayer | ( | unsigned int | index | ) |

Search for all occurrences

Deletes the layer denoted by the given index.

Parameters:

  [in] | index | The index of the layer

Returns:
  Status Code

Status Codes:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid

MStatus clear | ( |  | ) |

Search for all occurrences

Clear all of the camera layers.

Returns:
  Status Code

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

unsigned int getNumLayers | ( | MStatus * | returnStatus = `NULL` | ) |

Search for all occurrences

Return the number of layers in the cameraSet.

Parameters:

  [out] | returnStatus | The return status

Returns:
  The number of layers

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MStatus setLayerCamera | ( | unsigned int | index,
|  | const MDagPath & | camera
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kInvalidObjectType Camera and/or set incorrectly specified
  - MS::kFailure The operation failed

MStatus getLayerCamera | ( | unsigned int | index,
|  | MDagPath & | camera
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

MStatus setLayerSceneData | ( | unsigned int | index,
|  | const MObject & | set
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kInvalidObjectType The set was incorrectly specified
  - MS::kFailure The operation failed

MStatus getLayerSceneData | ( | unsigned int | index,
|  | MObject & | set
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

MStatus setLayerActive | ( | unsigned int | index,
|  | bool | isActive
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

bool isLayerActive | ( | unsigned int | index,
|  | MStatus * | returnStatus = `NULL`
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

MStatus setLayerOrder | ( | unsigned int | index,
|  | int | order
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

MStatus getLayerOrder | ( | unsigned int | index,
|  | int & | order
| ) |  |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

MStatus getSortedIndices | ( | MUintArray & | sortedIndices | ) |

Search for all occurrences

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

Parameters:

  [out] | sortedIndices | The sorted indices

Returns:
  Status Code

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure The operation failed

MStatus setLayerClearDepthValue | ( | unsigned int | index,
|  | bool | depth
| ) |  |

Search for all occurrences

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

Parameters:

  [in] | index | The index of the layer
  [in] | depth | The clear depth value

Returns:
  Status Code

Status Codes:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

MStatus getLayerClearDepthValue | ( | unsigned int | index,
|  | bool & | depth
| ) |  | const

Search for all occurrences

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

Parameters:

  [in] | index | The index of the layer
  [out] | depth | The clear depth value

Returns:
  Status Code

Status Codes:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter The passed index was invalid
  - MS::kFailure The operation failed

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