#include <MFnRenderLayer.h>
Provide functionalities for working with render layers such as getting the objects present in the render layer or checking whether the given object is in the current layer.
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnRenderLayer () |
Destructor. | |
MFnRenderLayer () | |
Default constructor. | |
MFnRenderLayer (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
bool | inLayer (const MObject &transform, MStatus *ReturnStatus=NULL) |
MStatus | layerChildren (MObjectArray &children, bool recurse=false) |
bool | inCurrentRenderLayer (const MDagPath &objectPath, MStatus *ReturnStatus=NULL) |
MStatus | listMembers (MObjectArray &objectsInLayer) const |
bool | isPlugAdjusted (const MPlug &scenePlug, MStatus *ReturnStatus=NULL) const |
MStatus | externalRenderPasses (MObjectArray &renderPassArray) const |
bool | passHasObject (const MObject &renderPass, const MDagPath &objectPath, MStatus *ReturnStatus=NULL) const |
bool | passHasLight (const MObject &renderPass, const MObject &light, MStatus *ReturnStatus=NULL) const |
MFnRenderLayer (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
Static Public Member Functions | |
static MObject | findLayerByName (const MString &renderLayer, MStatus *ReturnStatus=NULL) |
static MObject | defaultRenderLayer (MStatus *ReturnStatus=NULL) |
static MStatus | listAllRenderLayers (MObjectArray &rl) |
static MObject | currentLayer (MStatus *ReturnStatus=NULL) |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnRenderLayer::type | ( | ) | const [virtual] |
const char * MFnRenderLayer::className | ( | ) | const [protected, virtual] |
Returns true if the given shape is in this layer. This method will check all container layers for transform containment. The MObject specified must be a shape node.
[in] | transform | MObject of the shape we are testing against. |
[out] | ReturnStatus | Return code. |
MStatus MFnRenderLayer::layerChildren | ( | MObjectArray & | array, | |
bool | recurse = false | |||
) |
Returns the container layers for this layer. Container layers provide the ability for a given render layer to "contain" other render layers.
[in] | array | List of contained render layers. |
bool MFnRenderLayer::inCurrentRenderLayer | ( | const MDagPath & | objectPath, | |
MStatus * | ReturnStatus = NULL | |||
) |
The function checks if the given object is present in the current render layer or not.
[in] | objectPath | Path of the render layer object. |
[out] | ReturnStatus | Status code. |
MStatus MFnRenderLayer::listMembers | ( | MObjectArray & | objectsInLayer | ) | const |
Returns the objects present in the render layer.
[in] | objectsInLayer | The array of MObjects, present in the layer. |
The function checks if the specified plug is adjusted or not; returns true if the plug is adjusted, else returns false.
[in] | scenePlug | The plug which needs to be checked for adjustment. |
[out] | retStatus | MStatus object returning the status. |
MStatus MFnRenderLayer::externalRenderPasses | ( | MObjectArray & | renderPassArray | ) | const |
The function builds an array of unique render pass nodes (MObject) that are connected to the renderPass attribute. This function descends recursively into render pass sets to collect all connected render passes.
Arguments
bool MFnRenderLayer::passHasObject | ( | const MObject & | renderPass, | |
const MDagPath & | objectInstance, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
Returns true if the specified object instance contributes to the given render pass, based on the pass contribution maps attached to the layer. This method does not verify whether the object instance or the renderPass are actually rendered by the layer.
[in] | renderPass | a render pass node |
[in] | objectInstance | DAG path of a shape instance |
[out] | ReturnStatus | status of the method call. |
bool MFnRenderLayer::passHasLight | ( | const MObject & | renderPass, | |
const MObject & | light, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
Returns true if the specified light contributes to the given render pass, based on the pass contribution maps attached to this layer. This method does not verify whether the light or the renderPass are actually rendered by the layer.
[in] | renderPass | a render pass node |
[in] | light | a light shape node |
[out] | ReturnStatus | status of the method call. |
MObject MFnRenderLayer::findLayerByName | ( | const MString & | renderLayer, | |
MStatus * | ReturnStatus = NULL | |||
) | [static] |
This function returns an MObject to a render layer that matches the specified name. If no render layer is found with the given name, MObject::kNullObj is returned.
[in] | renderLayer | The name of the render layer. |
[out] | ReturnStatus | status of the method call. |
Returns the MObject for the defaultRenderLayer. This MObject can be used in MFnRenderLayer.
[out] | ReturnStatus | status of the method call. |
MStatus MFnRenderLayer::listAllRenderLayers | ( | MObjectArray & | array | ) | [static] |
Returns the list of render layers currently in the system.
[in] | array | MObjectArray of render layers. |
Returns the MObject for the current render layer. This MObject can be used in MFnRenderLayer.
[out] | ReturnStatus | status of the method call. |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |