Function set for render layer.
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.
#include <MFnRenderLayer.h>
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) |
Returns true if the given shape is in this
layer. |
|
MStatus | layerChildren (MObjectArray &children, bool recurse=false) |
Returns the container layers for this layer.
|
|
bool | inCurrentRenderLayer (const MDagPath &objectPath, MStatus *ReturnStatus=NULL) |
The function checks if the given object is
present in the current render layer or not. |
|
MStatus | listMembers (MObjectArray &objectsInLayer) const |
Returns the objects present in the render
layer. |
|
bool | isPlugAdjusted (const MPlug &scenePlug, MStatus *ReturnStatus=NULL) const |
The function checks if the specified plug is
adjusted or not; returns true if the plug is adjusted, else returns
false. |
|
MPlug | adjustmentPlug (const MPlug &scenePlug, MStatus *ReturnStatus=NULL) const |
Returns the render layer adjustment value
plug for the specified plug. |
|
MStatus | externalRenderPasses (MObjectArray &renderPassArray) const |
The function builds an array of unique
render pass nodes (MObject)
that are connected to the renderPass attribute. |
|
bool | passHasObject (const MObject &renderPass, const MDagPath &objectPath, 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. |
|
bool | 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. |
|
MFnRenderLayer (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
Static Public Member Functions |
|
static MObject | findLayerByName (const MString &renderLayer, MStatus *ReturnStatus=NULL) |
This function returns an MObject to
a render layer that matches the specified name. |
|
static MObject | defaultRenderLayer (MStatus *ReturnStatus=NULL) |
Returns the MObject
for the defaultRenderLayer. |
|
static MStatus | listAllRenderLayers (MObjectArray &rl) |
Returns the list of render layers currently
in the system. |
|
static MObject | currentLayer (MStatus *ReturnStatus=NULL) |
Returns the MObject
for the current render layer. |
|
Protected Member Functions |
|
virtual const char * | className () const |
Class name. |
MFnRenderLayer | ( | MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
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 |
MFnRenderLayer | ( | const MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
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 type | ( | ) | const [virtual] |
const char * 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 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. |
[in] | recurse | If true then the list operation will be applied recursively to any contained render layers which themselves contain other render layers. |
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 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. |
Returns the render layer adjustment value plug for the specified plug.
If there is no layer override on the plug, a copy of scenePlug is returned.
[in] | scenePlug | The plug for which the adjustment is sought. |
[out] | retStatus | MStatus object returning the status. |
MStatus 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.
[out] | renderPassArray | Array to which the result of the search is written. |
bool 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 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. |
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 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. |