MFnRenderLayer Class Reference
[OpenMayaRender - API module for renderingFunctionSet classes]

#include <MFnRenderLayer.h>

Inheritance diagram for MFnRenderLayer:

Inheritance graph
[legend]
Collaboration diagram for MFnRenderLayer:

Collaboration graph
[legend]

List of all members.


Detailed Description

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.

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 & Destructor Documentation

MFnRenderLayer::MFnRenderLayer ( 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:

MFnRenderLayer::MFnRenderLayer ( 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 MFnRenderLayer::type (  )  const [virtual]

Function set type.

Return the class type : MFn::kRenderLayer

Reimplemented from MFnDependencyNode.

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

Class name.

Return the class name : "MFnRenderLayer"

Reimplemented from MFnDependencyNode.

bool MFnRenderLayer::inLayer ( const MObject transform,
MStatus ReturnStatus = NULL 
)

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.

Parameters:
[in] transform MObject of the shape we are testing against.
[out] ReturnStatus Return code.
Status Codes:

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.

Parameters:
[in] array List of contained render layers.
Status Codes:

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.

Parameters:
[in] objectPath Path of the render layer object.
[out] ReturnStatus Status code.
Status Codes:

MStatus MFnRenderLayer::listMembers ( MObjectArray objectsInLayer  )  const

Returns the objects present in the render layer.

Parameters:
[in] objectsInLayer The array of MObjects, present in the layer.
Status Codes:

bool MFnRenderLayer::isPlugAdjusted ( const MPlug scenePlug,
MStatus retStatus = NULL 
) const

The function checks if the specified plug is adjusted or not; returns true if the plug is adjusted, else returns false.

Parameters:
[in] scenePlug The plug which needs to be checked for adjustment.
[out] retStatus MStatus object returning the status.
Status Codes:

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

  • renderPassArray The array to which the result of the search is written.
Status Codes

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.

Parameters:
[in] renderPass a render pass node
[in] objectInstance DAG path of a shape instance
[out] ReturnStatus status of the method call.
Status Codes:

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.

Parameters:
[in] renderPass a render pass node
[in] light a light shape node
[out] ReturnStatus status of the method call.
Status Codes:

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.

Parameters:
[in] renderLayer The name of the render layer.
[out] ReturnStatus status of the method call.
Status Codes:

MObject MFnRenderLayer::defaultRenderLayer ( MStatus ReturnStatus = NULL  )  [static]

Returns the MObject for the defaultRenderLayer. This MObject can be used in MFnRenderLayer.

Parameters:
[out] ReturnStatus status of the method call.
Status Codes:

MStatus MFnRenderLayer::listAllRenderLayers ( MObjectArray array  )  [static]

Returns the list of render layers currently in the system.

Parameters:
[in] array MObjectArray of render layers.
Status Codes:

MObject MFnRenderLayer::currentLayer ( MStatus ReturnStatus = NULL  )  [static]

Returns the MObject for the current render layer. This MObject can be used in MFnRenderLayer.

Parameters:
[out] ReturnStatus status of the method call.
Status Codes:


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6