Python API 2.0 Reference: OpenMayaRender.MLightParameterInformation Class Reference

+ Inheritance diagram for OpenMayaRender.MLightParameterInformation:

Public Member Functions

__init__ ()
 
arrayParameterCount ()
 
getParameter ()
 
getParameterTextureHandle ()
 
lightPath ()
 
lightType ()
 
parameterList ()
 
parameterNames ()
 
parameterSemantic ()
 
parameterType ()
 

Static Public Attributes

int kBoolean = 1
 
int kColor = 5
 
int kCosConeAngle = 10
 
int kDecayRate = 8
 
int kDepthRange = 21
 
int kDropoff = 9
 
int kEmitsDiffuse = 6
 
int kEmitsSpecular = 7
 
int kFloat = 3
 
int kFloat2 = 4
 
int kFloat3 = 5
 
int kFloat4 = 6
 
int kFloat4x4Col = 8
 
int kFloat4x4Row = 7
 
int kGlobalShadowOn = 18
 
int kInteger = 2
 
int kIntensity = 4
 
int kInvalid = 0
 
int kIrradianceIn = 11
 
int kLightEnabled = 1
 
int kNoSemantic = 0
 
int kSampler = 10
 
int kShadowBias = 14
 
int kShadowColor = 17
 
int kShadowDirty = 20
 
int kShadowMap = 12
 
int kShadowMapSize = 15
 
int kShadowOn = 19
 
int kShadowSamp = 13
 
int kShadowViewProj = 16
 
int kStartShadowParameters = 11
 
int kTexture2 = 9
 
int kTextureCube = 11
 
int kWorldDirection = 3
 
int kWorldPosition = 2
 

Detailed Description

Class for providing lighting information that may be used with Viewport 2.0.

Constructor & Destructor Documentation

OpenMayaRender.MLightParameterInformation.__init__ ( )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Member Function Documentation

OpenMayaRender.MLightParameterInformation.arrayParameterCount ( )
arrayParameterCount(string) -> int

Return the array size of a parameter. If the parameter is not an array then a value of 0 is returned.
OpenMayaRender.MLightParameterInformation.getParameter ( )
getParameter(int) -> MIntArraygetParameter(int) -> MFloatArraygetParameter(int) -> MMatrixgetParameter(int) -> MSamplerStateDescgetParameter(int) -> MTexturegetParameter(string) -> MIntArraygetParameter(string) -> MFloatArraygetParameter(string) -> MMatrixgetParameter(string) -> MSamplerStateDescgetParameter(string) -> MTexture

Get parameter value by name or by semantic.
If more than one parameter matches the semantic, the value of the first matching parameter found will be returned.
OpenMayaRender.MLightParameterInformation.getParameterTextureHandle ( )
getParameterTextureHandle(int) -> longgetParameterTextureHandle(string) -> long

Get a resource handle for a texture parameter by name or by semantic.
Returns a long containing a C++ 'void' pointer which points to the resource handle.
OpenMayaRender.MLightParameterInformation.lightPath ( )
lightPath() -> MDagPath

Returns the DagPath to the scene light. Will return an unitialized DagPath for default lights.
OpenMayaRender.MLightParameterInformation.lightType ( )
lightType() -> string

Get the classification of the light node.
OpenMayaRender.MLightParameterInformation.parameterList ( )
parameterList() -> list of string

Get the names of all light parameters that are accessible.
OpenMayaRender.MLightParameterInformation.parameterNames ( )
parameterNames(int) -> list of string

Get the name of all parameters on the light which are tagged with the stock semantic.
OpenMayaRender.MLightParameterInformation.parameterSemantic ( )
parameterSemantic(string) -> int

Get the stock semantic for a named parameter:
  MDrawContext.kNoSemantic       No semantic
  MDrawContext.kLightEnabled     Light is enabled
  MDrawContext.kWorldPosition    World space position
  MDrawContext.kWorldDirection   World space direction
  MDrawContext.kIntensity        Intensity
  MDrawContext.kColor            Color
  MDrawContext.kEmitsDiffuse     Emits diffuse lighting
  MDrawContext.kEmitsSpecular    Emits specular lighting
  MDrawContext.kDecayRate        Decay rate
  MDrawContext.kDropoff          Dropoff
  MDrawContext.kCosConeAngle     Cosine of the cone angle
  MDrawContext.kIrradianceIn     Incoming irradiance
  MDrawContext.kShadowMap        Shadow map
  MDrawContext.kShadowSamp       Shadow map sampler
  MDrawContext.kShadowBias       Shadow map bias
  MDrawContext.kShadowMapSize    Shadow map size
  MDrawContext.kShadowViewProj   Shadow map view projection matrix
  MDrawContext.kShadowColor      Shadow color
  MDrawContext.kGlobalShadowOn   Global toggle for whether shadows are enabled or not
  MDrawContext.kShadowOn         Local toggle per light for whether shadows are enabled or not
  MDrawContext.kShadowDirty      Indicates if the contents of the shadow map are out-of-date or uninitialized
OpenMayaRender.MLightParameterInformation.parameterType ( )
parameterType(string) -> int

Get the type of the named parameter, returns kInvalid if parameter is not found.

  MDrawContext.kInvalid        Invalid element type (default value)
  MDrawContext.kBoolean        Boolean
  MDrawContext.kInteger        Signed 32-bit integer
  MDrawContext.kFloat          IEEE single precision floating point
  MDrawContext.kFloat2         IEEE single precision floating point (x2)
  MDrawContext.kFloat3         IEEE single precision floating point (x3)
  MDrawContext.kFloat4         IEEE single precision floating point (x4)
  MDrawContext.kFloat4x4Row    IEEE single precision floating point row-major matrix (4x4)
  MDrawContext.kFloat4x4Col    IEEE single precision floating point column-major matrix (4x4)
  MDrawContext.kTexture2       2D texture
  MDrawContext.kSampler        Sampler