#include <MFnLightDataAttribute.h>
Function object for LightData attributes. A LightData attribute describes a single light source, giving its direction and intensity, as well as specifying whether or not it contributes to the ambient, diffuse, and specular components of the shading model.
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnLightDataAttribute () |
Destructor. | |
MFnLightDataAttribute () | |
Default constructor. | |
MFnLightDataAttribute (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MObject | create (const MString &fullName, const MString &briefName, const MObject &direction, const MObject &intensity, const MObject &ambient, const MObject &diffuse, const MObject &specular, const MObject &shadowFraciton, const MObject &preShadowIntensity, const MObject &blindData, MStatus *ReturnStatus=NULL) |
MStatus | getDefault (float &defDirectionX, float &defDirectionY, float &defDirectionZ, float &defIntensityR, float &defIntensityG, float &defIntensityB, bool &defAmbient, bool &defDiffuse, bool &defSpecular, float &defShadowFraction, float &defPreShadowIntensity, void *&defBlindData) |
MStatus | setDefault (float defDirectionX, float defDirectionY, float defDirectionZ, float defIntensityR, float defIntensityG, float defIntensityB, bool defAmbient, bool defDiffuse, bool defSpecular, float defShadowFraction, float defPreShadowIntensity, void *defBlindData) |
MObject | child (unsigned int index, MStatus *returnStatus) |
MFnLightDataAttribute (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFnLightDataAttribute::MFnLightDataAttribute | ( | const MObject & | object, | |
MStatus * | ReturnStatus = NULL | |||
) |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnLightDataAttribute::type | ( | ) | const [virtual] |
Function set type.
Return the class type : MFn::kLightDataAttribute
Reimplemented from MFnAttribute.
const char * MFnLightDataAttribute::className | ( | ) | const [protected, virtual] |
MObject MFnLightDataAttribute::create | ( | const MString & | fullName, | |
const MString & | briefName, | |||
const MObject & | direction, | |||
const MObject & | intensity, | |||
const MObject & | ambient, | |||
const MObject & | diffuse, | |||
const MObject & | specular, | |||
const MObject & | shadowFraction, | |||
const MObject & | preShadowIntensity, | |||
const MObject & | blindData, | |||
MStatus * | ReturnStatus = NULL | |||
) |
Creates a LightData attribute object.
The create method needs to be called on a per node basis. That means if you want to create and add the same attribute to multiple nodes, you need to call the create method for each node to get a unique MObject back. If you call create just once and add the attribute to multiple nodes, Maya will encounter a fatal error.
[in] | fullName | The full name of the attribute |
[in] | briefName | The brief name of the attribute |
[in] | direction | The 3Float child attribute that will represent the light direction |
[in] | intensity | The 3Float child attibute that will represent the light intensity |
[in] | ambient | The Boolean child attribute that specifies whether or not the light contributes to the ambient component of the shading model |
[in] | diffuse | The Boolean child attribute that specifies whether or not the light contributes to the diffuse component of the shading model |
[in] | specular | The Boolean child attribute that specifies whether or not the light contributes to the specular component of the shading model |
[in] | shadowFraction | The float attribute that will represent the percentage of the light that is in shadow with respect to the intersection point. 0 means the light is total visible to the intersection point and 1 means the light is total invisible to the intersection point. |
[in] | preShadowIntensity | The float attribute that will represetnt the light intensity without shadow consideration |
[out] | ReturnStatus | Status code for the operation. |
MStatus MFnLightDataAttribute::getDefault | ( | float & | defDirectionX, | |
float & | defDirectionY, | |||
float & | defDirectionZ, | |||
float & | defIntensityR, | |||
float & | defIntensityG, | |||
float & | defIntensityB, | |||
bool & | defAmbient, | |||
bool & | defDiffuse, | |||
bool & | defSpecular, | |||
float & | defShadowFraction, | |||
float & | defPreShadowIntensity, | |||
void *& | defBlindData | |||
) |
Gets the default value for the attribute.
[out] | defDirectionX | returns the default x component of light direction |
[out] | defDirectionY | returns the default y component of light direction |
[out] | defDirectionZ | returns the default z component of light direction |
[out] | defIntensityR | returns the default red component of light intensity |
[out] | defIntensityG | returns the default green component of light intensity |
[out] | defIntensityB | returns the default blue component of light intensity |
[out] | defAmbient | returns the default ambient flag |
[out] | defDiffuse | returns the default diffuse flag |
[out] | defSpecular | returns the default specular flag |
[out] | defShadowFraction | returns the default shadow fraction flag |
[out] | defPreShadowIntensity | returns the default pre shadow intensity flag |
[out] | defBlindData | returns the default blind data |
MStatus MFnLightDataAttribute::setDefault | ( | float | defDirectionX, | |
float | defDirectionY, | |||
float | defDirectionZ, | |||
float | defIntensityR, | |||
float | defIntensityG, | |||
float | defIntensityB, | |||
bool | defAmbient, | |||
bool | defDiffuse, | |||
bool | defSpecular, | |||
float | defShadowFraction, | |||
float | defPreShadowIntensity, | |||
void * | defBlindData | |||
) |
Sets the default value for the attribute.
[in] | defDirectionX | Default x component of light direction |
[in] | defDirectionY | Default y component of light direction |
[in] | defDirectionZ | Default z component of light direction |
[in] | defIntensityR | Default red component of light intensity |
[in] | defIntensityG | Default green component of light intensity |
[in] | defIntensityB | Default blue component of light intensity |
[in] | defAmbient | Default ambient flag |
[in] | defDiffuse | Default diffuse flag |
[in] | defSpecular | Default specular flag |
[in] | defShadowFraction | Default shadow fraction flag |
[in] | defPreShadowIntensity | Default pre shadow intensity flag |
[in] | defBlindData | Default blind data |
Gets a pointer to one of the child attributes.
[in] | index | Specifies which child is desired:
|
[out] | ReturnStatus | Status code for the operation |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |