- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnLambertShader Class Reference

# OpenMaya - API module for common classes | FunctionSet classes

Search for all occurrences

## Detailed Description

Manage Lambert shaders.

MFnLambertShader facilitates creation and manipulation of dependency graph nodes representing lambertian shaders.

`#include <MFnLambertShader.h>`

Inheritance diagram for MFnLambertShader:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnLambertShader ()
| Destructor.
| MFnLambertShader ()
| Default constructor.
| MFnLambertShader (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
MObject | create (bool UIvisible=true, MStatus *ReturnStatus=NULL)
| Creates a new lambert shader dependency graph node and adds it to the dependency graph.
short | refractedRayDepthLimit (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "refractedRayDepthLimit" attribute of a lambert shader node.
MStatus | setRefractedRayDepthLimit (const short &new_limit)
| Sets the value of the "refractedRayDepthLimit" attribute of a lambert shader node.
float | refractiveIndex (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "refractiveIndex" attribute of a lambert shader node.
MStatus | setRefractiveIndex (const float &refractive_index)
| Sets the value of the "refractiveIndex" attribute of a shader node.
bool | rtRefractedColor (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "rtRefractedColor" attribute of a shader node.
MStatus | setRtRefractedColor (const bool &rt_refracted_color)
| Sets the value of the "rtRefractedColor" attribute of a shader node.
float | diffuseCoeff (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "diffuseCoeff" attribute of a lambert shader node.
MStatus | setDiffuseCoeff (const float &diffuse_coeff)
| Sets the value of the "diffuseCoeff" attribute of a shader node.
MColor | color (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "color" attribute of a shader node.
MStatus | setColor (const MColor &col)
| Sets the value of the "color" attribute of a shader node.
MColor | transparency (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "transparency" attribute of a shader node.
MStatus | setTransparency (const MColor &transp)
| Sets the value of the "transparency" attribute of a shader node.
MColor | ambientColor (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "ambientColor" attribute of a shader node.
MStatus | setAmbientColor (const MColor &ambient_color)
| Sets the value of the "ambientColor" attribute of a shader node.
MColor | incandescence (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "incandescence" attribute of a shader node.
MStatus | setIncandescence (const MColor &incand)
| Sets the value of the "incandescence" attribute of a shader node.
float | translucenceCoeff (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "translucenceCoeff" attribute of a lambert shader node.
MStatus | setTranslucenceCoeff (const float &translucence_coeff)
| Sets the value of the "translucenceCoeff" attribute of a shader node.
float | glowIntensity (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "glowIntensity" attribute of a shader node.
MStatus | setGlowIntensity (const float &glow_intensity)
| Sets the value of the "glowIntensity" attribute of a shader node.
bool | hideSource (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "hideSource" attribute of a shader node.
MStatus | setHideSource (const bool &hide_source)
| Sets the value of the "hideSource" attribute of a shader node.
| MFnLambertShader (const MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

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

## Member Function Documentation

MFn::Type type | ( |  | ) | const `[virtual]`

Search for all occurrences

Function set type.

Return the class type : MFn::kLambert.

Reimplemented from MFnDependencyNode.

Reimplemented in MFnBlinnShader, MFnPhongShader, and MFnReflectShader.

const char * className | ( |  | ) | const `[protected, virtual]`

Search for all occurrences

Class name.

Return the class name : "MFnLambertShader".

Reimplemented from MFnDependencyNode.

Reimplemented in MFnBlinnShader, MFnPhongShader, and MFnReflectShader.

MObject create | ( | bool | UIvisible = `true`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

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.

Parameters:

  [in] | UIvisible | determines whether or not the new node will be connected to the shader classification node.
  [out] | ReturnStatus | return status

Returns:
  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.

Reimplemented in MFnBlinnShader, and MFnPhongShader.

short refractedRayDepthLimit | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setRefractedRayDepthLimit | ( | const short & | refracted_ray_depth_limit | ) |

Search for all occurrences

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

Parameters:

  [in] | refracted_ray_depth_limit | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

float refractiveIndex | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the value of the "refractiveIndex" attribute of a lambert shader node.

This attribute represents the refractive index of the shader.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setRefractiveIndex | ( | const float & | refractive_index | ) |

Search for all occurrences

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

Parameters:

  [in] | refractive_index | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

bool rtRefractedColor | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setRtRefractedColor | ( | const bool & | rt_refracted_color | ) |

Search for all occurrences

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

Parameters:

  [in] | rt_refracted_color | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

float diffuseCoeff | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the value of the "diffuseCoeff" attribute of a lambert shader node.

This attribute represents the diffuse reflectivity of the shader.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setDiffuseCoeff | ( | const float & | diffuse_coeff | ) |

Search for all occurrences

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

Parameters:

  [in] | diffuse_coeff | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

MColor color | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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

This attribute represents the surface color of the shader.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setColor | ( | const MColor & | col | ) |

Search for all occurrences

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

Parameters:

  [in] | col | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

MColor transparency | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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

This attribute represents the surface transparency of the shader.

Parameters:

  [out] | ReturnStatus | return status

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

Search for all occurrences

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

Parameters:

  [in] | transp | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

MColor ambientColor | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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

This attribute represents the ambient color of the shader.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setAmbientColor | ( | const MColor & | ambient_color | ) |

Search for all occurrences

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

Parameters:

  [in] | ambient_color | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

MColor incandescence | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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

This attribute represents the incandescence of the shader.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setIncandescence | ( | const MColor & | incand | ) |

Search for all occurrences

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

Parameters:

  [in] | incand | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

float translucenceCoeff | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setTranslucenceCoeff | ( | const float & | translucence_coeff | ) |

Search for all occurrences

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

Parameters:

  [in] | translucence_coeff | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

float glowIntensity | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setGlowIntensity | ( | const float & | glow_intensity | ) |

Search for all occurrences

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

Parameters:

  [in] | glow_intensity | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

bool hideSource | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  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 setHideSource | ( | const bool & | hide_source | ) |

Search for all occurrences

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

Parameters:

  [in] | hide_source | value to which the attribute will be set.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object,

MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader
MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader MFnLambertShader