class MFnLayeredShader

Jump to documentation

: public MFnDependencyNode Manage Layered shaders. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnLayeredShader < MFnDependencyNode < MFnBase

public members:

MFnLayeredShader ()
MFnLayeredShader ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnLayeredShader ()
virtual MFn::Type type () const
MObject create ( bool UIvisible = true, MStatus * ReturnStatus = NULL )
short compositingFlag ( MStatus * ReturnStatus = NULL ) const
MStatus setCompositingFlag ( const short & cflag )
MColor color ( unsigned int lIndex = 0, MStatus * ReturnStatus = NULL ) const
MStatus setColor ( const MColor & col, unsigned int lIndex = 0 )
MColor transparency ( unsigned int lIndex = 0, MStatus * ReturnStatus = NULL ) const
MStatus setTransparency ( const MColor & transp, unsigned int lIndex = 0 )
MColor glowColor ( unsigned int lIndex = 0, MStatus * ReturnStatus = NULL ) const
MStatus setGlowColor ( const MColor & glow_color, unsigned int lIndex = 0 )
MColor hardwareColor ( MStatus * ReturnStatus = NULL ) const
MStatus setHardwareColor ( const MColor & hardware_color )
MColor hardwareShader ( MStatus * ReturnStatus = NULL ) const
MStatus setHardwareShader ( const MColor & hardware_shader )
MFnLayeredShader ( const MObject & object, MStatus * ReturnStatus = NULL )

Inherited from MFnDependencyNode:

public members:

virtual MFn::Type type () const
enum MAttrClass
kGlobalDynamicAttr
kLocalDynamicAttr
MObject create ( const MTypeId & typeId , MStatus * ReturnStatus = NULL )
MObject create ( const MTypeId & typeId , const MString & name , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , const MString & name , MStatus * ReturnStatus = NULL )
MTypeId typeId ( MStatus * ReturnStatus = NULL ) const
MString typeName ( MStatus * ReturnStatus = NULL ) const
MString name ( MStatus * ReturnStatus = NULL ) const
MString setName ( const MString & name , MStatus * ReturnStatus = NULL )
MStatus getConnections ( MPlugArray & array ) const
unsigned int attributeCount ( MStatus * ReturnStatus=NULL) const
MObject attribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject reorderedAttribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject attribute ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MAttrClass attributeClass ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MStatus getAffectedAttributes ( const MObject & attr, MObjectArray & affectedAttributes ) const
MStatus getAffectedByAttributes ( const MObject & attr, MObjectArray & affectedByAttributes ) const
MPlug findPlug ( const MObject & attr, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MStatus addAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MStatus removeAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MPxNode * userNode ( MStatus * ReturnStatus=NULL ) const
bool isFromReferencedFile ( MStatus * ReturnStatus=NULL) const
bool isShared ( MStatus * ReturnStatus=NULL) const
bool hasUniqueName ( MStatus * ReturnStatus=NULL) const
MString parentNamespace ( MStatus * ReturnStatus=NULL) const
bool isLocked ( MStatus * ReturnStatus=NULL) const
MStatus setLocked ( bool locked )
static MString classification ( const MString & nodeTypeName )
bool isNewAttribute ( const MObject & attr, MStatus * ReturnStatus=NULL) const
static unsigned int allocateFlag ( const MString pluginName, MStatus * ReturnStatus=NULL )
static MStatus deallocateFlag (const MString pluginName, unsigned int flag)
static MStatus deallocateAllFlags (const MString pluginName)
MStatus setFlag (unsigned int flag, bool state)
bool isFlagSet (unsigned int flag, MStatus * ReturnStatus=NULL) const
bool isDefaultNode ( MStatus * ReturnStatus=NULL) const
MStatus setDoNotWrite ( bool flag )
bool canBeWritten ( MStatus * ReturnStatus=NULL) const
bool hasAttribute (const MString & name , MStatus * ReturnStatus=NULL) const
MObject getAliasAttr (bool force, MStatus * ReturnStatus=NULL)
bool setAlias (const MString & alias,const MString & name , const MPlug & plug, bool add=true, MStatus * ReturnStatus=NULL)
bool findAlias (const MString & alias, MObject & attrObj, MStatus * ReturnStatus=NULL) const
bool getAliasList ( MStringArray & strArray, MStatus * ReturnStatus=NULL)
MString plugsAlias (const MPlug & plug, MStatus * ReturnStatus=NULL)
public
bool getPlugsAlias (const MPlug & plug, MString & aliasName, MStatus * ReturnStatus=NULL)

Inherited from MFnBase:

public members:

virtual MFn::Type type () const
bool hasObj ( MFn::Type ) const
bool hasObj ( const MObject & ) const
MObject object ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( MObject & object )
virtual MStatus setObject ( const MObject & object )

Documentation

Facilitate the creation and manipulation of Layered shaders.
Description
MFnLayeredShader facilitates creation and manipulation of dependency graph nodes representing layered shaders.

Functions

MFnLayeredShader:: MFnLayeredShader ()

Description

Default class constructor. The function set is not attached to an MObject.

MFnLayeredShader:: MFnLayeredShader ( MObject & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given MObject.

Arguments

  • object the MObject to attach the function set to
  • ReturnStatus the return status
    • 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

MFnLayeredShader:: MFnLayeredShader ( const MObject & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given constant MObject.

Arguments

  • object the const MObject to attach the function set to
  • ReturnStatus the return status
    • 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

MFnLayeredShader:: ~MFnLayeredShader ()

Description

The class destructor.

MFn::Type MFnLayeredShader:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kLayeredShader

MObject MFnLayeredShader:: create ( bool UIvisible, MStatus * ReturnStatus )

Description

Creates a new layered shader dependency graph node and adds it to the dependency graph. If the UIvisible parameter is true, the new node will be connected to the shader classification node (which allows the UI to recognize the node as a shader). If UIvisible is false, the node will be created in isolation.

Arguments

  • UIvisible determines whether or not the new node will be connected to the shader classification node.
  • ReturnStatus return status

Return Value

  • MObject representing the new dependency node.

Status Codes

  • MS::kSuccess operation successful
  • MS::kInsufficientMemory ran out of memory
  • MS::kNoModelActive no model is currently active
  • MS::kLicenseFailure application not licensed for attempted operation
  • MS::kFailure the new node could not be created, or the new node could not be added to the dependency graph, or the new node could not be connected to the classification node.

short MFnLayeredShader:: compositingFlag ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "compositingFlag" attribute of a shader node.

Arguments

  • ReturnStatus return status

Return Value

  • The value of the "compositingFlag" attribute of the shader node.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object.

MStatus MFnLayeredShader:: setCompositingFlag ( const short & cflag )

Description

Sets the value of the "compositingFlag" attribute of a shader node.

Arguments

  • col value to which the attribute will be set.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object,

MColor MFnLayeredShader:: color ( unsigned int lIndex, MStatus * ReturnStatus ) const

Description

Retrieves the value of the "color" attribute of a shader node. This attribute represents the surface color of the shader.

Arguments

  • ReturnStatus return status

Return Value

  • The value of the "color" attribute of the shader node.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object.

MStatus MFnLayeredShader:: setColor ( const MColor &col, unsigned int lIndex )

Description

Sets the value of the "color" attribute of a shader node.

Arguments

  • col value to which the attribute will be set.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object,

MColor MFnLayeredShader:: transparency ( unsigned int lIndex, MStatus * ReturnStatus ) const

Description

Retrieves the value of the "transparency" attribute of a shader node. This attribute represents the surface transparency of the shader.

Arguments

  • ReturnStatus return status

Return Value

  • The value of the "transparency" attribute of the shader node.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object.

MStatus MFnLayeredShader:: setTransparency ( const MColor &transp, unsigned int lIndex )

Description

Sets the value of the "transparency" attribute of a shader node.

Arguments

  • transp value to which the attribute will be set.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object,

MColor MFnLayeredShader:: glowColor ( unsigned int lIndex, MStatus * ReturnStatus ) const

Description

Retrieves the value of the "glowColor" attribute of a shader node. This attribute represents the ambient color of the shader.

Arguments

  • ReturnStatus return status

Return Value

  • The value of the "glowColor" attribute of the shader node.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object.

MStatus MFnLayeredShader:: setGlowColor ( const MColor &glow_color, unsigned int lIndex )

Description

Sets the value of the "glowColor" attribute of a shader node.

Arguments

  • glow_color value to which the attribute will be set.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object,

MColor MFnLayeredShader:: hardwareColor ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "hardwareColor" attribute of a shader node. This attribute represents the color of the material that appears in shaded mode.

Arguments

  • ReturnStatus return status

Return Value

  • The value of the "hardwareColor" attribute of the shader node.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object.

MStatus MFnLayeredShader:: setHardwareColor ( const MColor &hardware_color )

Description

Sets the value of the "hardwareColor" attribute of a shader node.

Arguments

  • hardware_color value to which the attribute will be set.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object,

MColor MFnLayeredShader:: hardwareShader ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "hardwareShader" attribute of a layered shader node.

Arguments

  • ReturnStatus return status

Return Value

  • The value of the "hardwareShader" attribute of the shader node.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object.

MStatus MFnLayeredShader:: setHardwareShader ( const MColor & hardware_shader )

Description

Sets the value of the "hardwareShader" attribute of a shader node.

Arguments

  • hardware_shader value to which the attribute will be set.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object,

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright