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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnAmbientLight Class Reference
OpenMaya - API module for common classes | FunctionSet classes

Search for all occurrences

## Detailed Description

Manage Ambient Light dependency Nodes.

MFnAmbientLight facilitates creation and manipulation of ambient light dependency graph nodes.

`#include <MFnAmbientLight.h>`

Inheritance diagram for MFnAmbientLight:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnAmbientLight ()
| Destructor.
| MFnAmbientLight ()
| Default constructor.
| MFnAmbientLight (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
| MFnAmbientLight (const MDagPath &object, MStatus *ret=NULL)
| Constructor.
MObject | create (bool UIvisible=true, MStatus *ReturnStatus=NULL)
| Creates a new ambient light dependency graph node and adds it to the dependency graph.
MObject | create (const MObject &parent, bool UIvisible=true, bool wantTransform=false, MStatus *ReturnStatus=NULL)
| Creates a new ambient light dependency graph node and adds it to the dependency graph.
float | ambientShade (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "ambientShade" attribute of an ambient light node.
MStatus | setAmbientShade (const float &ambient_shade)
| Sets the value of the "ambientShade" attribute of an ambient light node.
bool | castSoftShadows (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "castSoftShadows" attribute of an ambient light node.
MStatus | setCastSoftShadows (const bool &cast_soft_shadows)
| Sets the value of the "castSoftShadows" attribute of an ambient light node.
float | shadowRadius (MStatus *ReturnStatus=NULL) const
| Retrieves the value of the "shadowRadius" attribute of an ambient light node.
MStatus | setShadowRadius (const float &shadow_radius)
| Sets the value of the "shadowRadius" attribute of an ambient light node.
| MFnAmbientLight (const MObject &object, MStatus *ret=NULL)
| Constructor.
MObject | create (const MObject &parent, bool UIvisible=true, MStatus *ReturnStatus=NULL)
| NO SCRIPT SUPPORT.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

~MFnAmbientLight | ( |  | ) | `[virtual]`

Destructor.

The class destructor.

MFnAmbientLight | ( | 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

MFnAmbientLight | ( | const MDagPath & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given constant MDagPath object.

Parameters:

  [in] | object | The const MDagPath 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

MFnAmbientLight | ( | 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::kAmbientLight.

Reimplemented from MFnLight.

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

Search for all occurrences

Class name.

Return the class name : "MFnAmbientLight".

Reimplemented from MFnLight.

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

Search for all occurrences

Creates a new ambient light dependency graph node and adds it to the dependency graph.

If the UIvisible parameter is true, the new node will be connected to the light classification node (which allows the UI to recognize the node as a light) and added to the default light list. If UIvisible is false, the node will be created in isolation.

The light node is added to the current model, under a new transformation.

Parameters:

  [in] | UIvisible | determines whether or not to connect the new node to the light classification node and add it to the default light list.
  [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 added to the model, or the function set could not be properly initialized with the new object.

MObject create | ( | const MObject & | parent,
|  | bool | UIvisible = `true`,
|  | bool | wantTransform = `false`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Creates a new ambient light dependency graph node and adds it to the dependency graph.

If the UIvisible parameter is true, the new node will be connected to the light classification node (which allows the UI to recognize the node as a light) and added to the default light list. If UIvisible is false, the node will be created in isolation.

If wantTransform parameter is false ( which is by default ), the new shape node is created under the specified parent and no transform node is created. If the specified parent is null, then no shape node will be created.

The light node is added to the current model, under the specified parent.

Parameters:

  [in] | parent | the node under which the new light and its transform will be added.
  [in] | wantTransform | Boolean to indicate whether the transform node is needed or not, which is 'false' by default.
  [in] | UIvisible | determines whether or not to connect the new node to the light classification node and add it to the default light list.
  [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 added to the model, or the function set could not be properly initialized with the new object.

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

Search for all occurrences

Retrieves the value of the "ambientShade" attribute of an ambient light node.

This attribute determines how positional the light is. A value of 0 represents a completely ambient light, while a value of 1 represents a point light.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  The value of the "ambientShade" attribute of the ambient light node.

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

MStatus setAmbientShade | ( | const float & | ambient_shade | ) |

Search for all occurrences

Sets the value of the "ambientShade" attribute of an ambient light node.

Parameters:

  [in] | ambient_shade | 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 castSoftShadows | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the value of the "castSoftShadows" attribute of an ambient light node.

This attribute determines whether or not the light casts soft shadows.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  The value of the "castSoftShadows" attribute of the ambient light node.

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

MStatus setCastSoftShadows | ( | const bool & | cast_soft_shadows | ) |

Search for all occurrences

Sets the value of the "castSoftShadows" attribute of an ambient light node.

Parameters:

  [in] | cast_soft_shadows | 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 shadowRadius | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the value of the "shadowRadius" attribute of an ambient light node.

This attribute represents the radius of the light used when computing soft shadows. Higher radius values result in more extended soft shadows.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  The value of the "shadowRadius" attribute of the ambient light node.

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

MStatus setShadowRadius | ( | const float & | shadow_radius | ) |

Search for all occurrences

Sets the value of the "shadowRadius" attribute of an ambient light node.

Parameters:

  [in] | shadow_radius | 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,

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

Search for all occurrences

NO SCRIPT SUPPORT.

Creates a new ambient light dependency graph node and adds it to the dependency graph.

If the UIvisible parameter is true, the new node will be connected to the light classification node (which allows the UI to recognize the node as a light) and added to the default light list. If UIvisible is false, the node will be created in isolation.

The light node is added to the current model, under a new transformation. The transformation is added to the current model under the specified parent.

Parameters:

  [in] | parent | the node under which the new light and its transform will be added.
  [in] | UIvisible | determines whether or not to connect the new node to the light classification node and add it to the default light list.
  [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 added to the model, or the function set could not be properly initialized with the new object.

MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight
MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight MFnAmbientLight