class MFnLambertShader

Jump to documentation

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

Inheritance:

MFnLambertShader < MFnDependencyNode < MFnBase

public members:

MFnLambertShader ()
MFnLambertShader ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnLambertShader ()
virtual MFn::Type type () const
MObject create ( bool UIvisible = true, MStatus * ReturnStatus = NULL )
short refractedRayDepthLimit ( MStatus * ReturnStatus = NULL ) const
MStatus setRefractedRayDepthLimit ( const short& new_limit )
float refractiveIndex ( MStatus * ReturnStatus = NULL ) const
MStatus setRefractiveIndex ( const float& refractive_index )
bool rtRefractedColor ( MStatus * ReturnStatus = NULL ) const
MStatus setRtRefractedColor ( const bool& rt_refracted_color )
float diffuseCoeff ( MStatus * ReturnStatus = NULL ) const
MStatus setDiffuseCoeff ( const float& diffuse_coeff )
MColor color ( MStatus * ReturnStatus = NULL ) const
MStatus setColor ( const MColor & col )
MColor transparency ( MStatus * ReturnStatus = NULL ) const
MStatus setTransparency ( const MColor & transp )
MColor ambientColor ( MStatus * ReturnStatus = NULL ) const
MStatus setAmbientColor ( const MColor & ambient_color )
MColor incandescence ( MStatus * ReturnStatus = NULL ) const
MStatus setIncandescence ( const MColor & incand )
float translucenceCoeff ( MStatus * ReturnStatus = NULL ) const
MStatus setTranslucenceCoeff ( const float& translucence_coeff )
float glowIntensity ( MStatus * ReturnStatus = NULL ) const
MStatus setGlowIntensity ( const float& glow_intensity )
bool hideSource ( MStatus * ReturnStatus = NULL ) const
MStatus setHideSource ( const bool& hide_source )
MFnLambertShader ( 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 Lambert shaders.
Description
MFnLambertShader facilitates creation and manipulation of dependency graph nodes representing lambertian shaders.

Functions

MFnLambertShader:: MFnLambertShader ()

Description

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

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

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

MFnLambertShader:: ~MFnLambertShader ()

Description

The class destructor.

MFn::Type MFnLambertShader:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kLambert

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

Description

Creates a new lambert 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 MFnLambertShader:: refractedRayDepthLimit ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "refractedRayDepthLimit" attribute of a lambert shader node. This attribute represents the maximum refracted ray depth used in the shading calculation.

Arguments

  • ReturnStatus return status

Return Value

  • The value of the "refractedRayDepthLimit" attribute of the node.

Status Codes

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

MStatus MFnLambertShader:: setRefractedRayDepthLimit ( const short& refracted_ray_depth_limit )

Description

Sets the value of the "refractedRayDepthLimit" attribute of a lambert shader node.

Arguments

  • refracted_ray_depth_limit 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,

float MFnLambertShader:: refractiveIndex ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "refractiveIndex" attribute of a lambert shader node. This attribute represents the refractive index of the shader.

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setRefractiveIndex ( const float& refractive_index )

Description

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

Arguments

  • refractive_index 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,

bool MFnLambertShader:: rtRefractedColor ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "rtRefractedColor" attribute of a shader node. This attribute determines whether the shader uses the value of the "refractedColor" attribute for the refracted color or calculated the refracted color itself.

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setRtRefractedColor ( const bool& rt_refracted_color )

Description

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

Arguments

  • rt_refracted_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,

float MFnLambertShader:: diffuseCoeff ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "diffuseCoeff" attribute of a lambert shader node. This attribute represents the diffuse reflectivity of the shader.

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setDiffuseCoeff ( const float& diffuse_coeff )

Description

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

Arguments

  • diffuse_coeff 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 MFnLambertShader:: color ( 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 MFnLambertShader:: setColor ( const MColor &col )

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 MFnLambertShader:: transparency ( 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 MFnLambertShader:: setTransparency ( const MColor &transp )

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 MFnLambertShader:: ambientColor ( MStatus * ReturnStatus ) const

Description

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

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setAmbientColor ( const MColor &ambient_color )

Description

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

Arguments

  • ambient_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 MFnLambertShader:: incandescence ( MStatus * ReturnStatus ) const

Description

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

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setIncandescence ( const MColor &incand )

Description

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

Arguments

  • incand 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,

float MFnLambertShader:: translucenceCoeff ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "translucenceCoeff" attribute of a lambert shader node. This attribute represents a constant multiplier applied to the transparency attribute of the shader.

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setTranslucenceCoeff ( const float& translucence_coeff )

Description

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

Arguments

  • translucence_coeff 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,

float MFnLambertShader:: glowIntensity ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "glowIntensity" attribute of a shader node. This attribute represents the constant multplier applied to the glow color of the shader.

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setGlowIntensity ( const float &glow_intensity )

Description

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

Arguments

  • glow_intensity 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,

bool MFnLambertShader:: hideSource ( MStatus * ReturnStatus ) const

Description

Retrieves the value of the "hideSource" attribute of a shader node. This attribute determines whether or not the computed surface color is used in the shading computation. If hideSource is true, then only the computed shader glow color will be used. Otherwise, both the glow and surface colors will be used.

Arguments

  • ReturnStatus return status

Return Value

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

Status Codes

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

MStatus MFnLambertShader:: setHideSource ( const bool& hide_source )

Description

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

Arguments

  • hide_source 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,

Direct child classes:

- MFnReflectShader

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