Python API 2.0 Reference
OpenMayaRender.MPxSurfaceShadingNodeOverride Class Reference
+ Inheritance diagram for OpenMayaRender.MPxSurfaceShadingNodeOverride:

Public Member Functions

def __init__ ()
 
def bumpAttribute ()
 
def primaryColorParameter ()
 
def transparencyParameter ()
 
- Public Member Functions inherited from OpenMayaRender.MPxShadingNodeOverride
def __init__ ()
 
def allowConnections ()
 
def fragmentName ()
 
def getCustomMappings ()
 
def outputForConnection ()
 
def supportedDrawAPIs ()
 
def updateDG ()
 
def updateShader ()
 
def valueChangeRequiresFragmentRebuild ()
 

Static Public Member Functions

def __new__ ()
 
- Static Public Member Functions inherited from OpenMayaRender.MPxShadingNodeOverride
def __new__ ()
 

Detailed Description

Base class for user defined surface shading node overrides.

Method resolution order:
-   MPxSurfaceShadingNodeOverride
-   MPxShadingNodeOverride
-   builtins.object

Constructor & Destructor Documentation

def OpenMayaRender.MPxSurfaceShadingNodeOverride.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaRender.MPxSurfaceShadingNodeOverride.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaRender.MPxSurfaceShadingNodeOverride.bumpAttribute ( )
bumpAttribute() -> string

Returns the name of the attribute that accepts bump connections from bump nodes.

This method is called after getCustomMappings() to allow the plugin to provide surface-shader specific information.
If required, the override may return the name of the attribute on the node that accepts connections from bump nodes for
doing bump or normal mapping (often this is "normalCamera"). A special mapping will be created linking this attribute
to the parameter named "Nw" (world space normal) on the fragment. The special mapping will ensure that the extra fragments
needed for bump mapping are set up correctly. If there is no "Nw" parameter on the fragment the mapping will not be created
and bump mapping will not work for the associated shader.

The default implementation returns the empty string (no bump).
def OpenMayaRender.MPxSurfaceShadingNodeOverride.primaryColorParameter ( )
primaryColorParameter() -> string

Returns the name of the fragment parameter to use as the primary color.

This method is called just after getCustomMappings() to allow the plugin to provide extra surface shader-specific
information. If required, the override may return the name of a 3-float parameter on the fragment that should be marked
as the primary color. If the viewport is set to hide textures (shaded mode) then the specified parameter will be set
using the "default color" value from the texture which is connected to the associated attribute on the Maya node.

The default implementation returns the empty string (no primary color).

The name must correspond to a parameter on the fragment that is mapped to an attribute on the node either automatically
or through custom attribute parameter mappings.
def OpenMayaRender.MPxSurfaceShadingNodeOverride.transparencyParameter ( )
transparencyParameter() -> string

Returns the name of the fragment parameter that should drive transparency.

This method is called just after getCustomMappings() to allow the plugin to provide extra surface shader-specific
information. If required, the override may return the name of a single float or 3-float parameter on the fragment that
should be marked as the parameter that drives the transparency of the surface shader. The values of this parameter will
be watched so that scene objects using this shader will be correctly marked and sorted for transparent drawing.

The default implementation returns the empty string (no transparency).

The name must correspond to a parameter on the fragment that is mapped to an attribute on the node either automatically
or through custom attribute parameter mappings.