Python API 2.0 Reference
|
Public Member Functions | |
def | __init__ () |
def | asBool () |
def | asFloat () |
def | asFloatArray () |
def | asInt () |
def | asString () |
def | copy () |
def | hasChanged () |
def | isATexture () |
def | name () |
def | numColumns () |
def | numElements () |
def | numRows () |
def | plug () |
def | semantic () |
def | setBool () |
def | setDirty () |
def | setFloat () |
def | setFloatArray () |
def | setInt () |
def | setString () |
def | source () |
def | type () |
def | userData () |
Static Public Member Functions | |
def | __new__ () |
Properties | |
enumFieldNames = property(...) | |
keyable = property(...) | |
rangeMax = property(...) | |
rangeMin = property(...) | |
softRangeMax = property(...) | |
softRangeMin = property(...) | |
uiHidden = property(...) | |
uiNiceName = property(...) | |
The MUniformParameter class provides a high-level interface to hardware shader uniform parameters. By defining your shader's uniform parameters through this class, you allow Maya to handle the attributes, editing, serialisation, and caching for you in a standard way that ensure you'll be able to leverage future performance and functionlity improvements.
def OpenMayaRender.MUniformParameter.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
|
static |
Create and return a new object. See help(type) for accurate signature.
def OpenMayaRender.MUniformParameter.asBool | ( | ) |
asBool(context) -> bool Get the value of this uniform parameter as a boolean value. Because some parameters can be shape-dependent, the method requires access to the current context being rendered. * context (MDrawContext) - Draw context being used for render.
def OpenMayaRender.MUniformParameter.asFloat | ( | ) |
asFloat(context) -> float Get the value of this uniform parameter as a float. Because some parameters can be shape-dependent, the method requires access to the current context being rendered. * context (MDrawContext) - Draw context being used for render.
def OpenMayaRender.MUniformParameter.asFloatArray | ( | ) |
asFloatArray(context) -> tuple of floats Get the value of this uniform parameter as one or more floating point values. Because some parameters can be shape-dependent, the method requires access to the current context being rendered. * context (MDrawContext) - Draw context being used for render.
def OpenMayaRender.MUniformParameter.asInt | ( | ) |
asInt(context) -> int Get the value of this uniform parameter as an integer. Because some parameters can be shape-dependent, the method requires access to the current context being rendered. * context (MDrawContext) - Draw context being used for render.
def OpenMayaRender.MUniformParameter.asString | ( | ) |
asString(context) -> string Get the value of this uniform parameter as a string. Because some parameters can be shape-dependent, the method requires access to the current context being rendered. * context (MDrawContext) - Draw context being used for render.
def OpenMayaRender.MUniformParameter.copy | ( | ) |
copy(source) -> self Copy data from source parameter. * source (MUniformParameter) - The source parameter to copy from
def OpenMayaRender.MUniformParameter.hasChanged | ( | ) |
hasChanged(context) -> bool Has the value of this parameter changed since the last time it was accessed? This allows your shader to minimise state changes by only updating modified parameters. * context (MDrawContext) - Draw context being used for render.
def OpenMayaRender.MUniformParameter.isATexture | ( | ) |
isATexture() -> bool Returns True if this parameter represents a texture, False otherwise.
def OpenMayaRender.MUniformParameter.name | ( | ) |
name() -> string Get the name of this parameter.
def OpenMayaRender.MUniformParameter.numColumns | ( | ) |
numColumns() -> int Get the number of columns in this parameter.
def OpenMayaRender.MUniformParameter.numElements | ( | ) |
numElements() -> int Get the number of elements in this parameter (including rows and columns).
def OpenMayaRender.MUniformParameter.numRows | ( | ) |
numRows() -> int Get the number of rows in this parameter.
def OpenMayaRender.MUniformParameter.plug | ( | ) |
plug() -> MPlug Get the plug managed by this parameter.
def OpenMayaRender.MUniformParameter.semantic | ( | ) |
semantic() -> int Get the semantic of this parameter. The list of available semantic values can be obtained with the following commands: print filter(lambda k: k.startswith('kSemantic'), dir(maya.api.OpenMayaRender.MUniformParameter))
def OpenMayaRender.MUniformParameter.setBool | ( | ) |
setBool(value) -> self Set the value of this uniform parameter as a boolean value. Note that it is not possible to set shape-dependent parameters. * value (bool) - the new value for this parameter.
def OpenMayaRender.MUniformParameter.setDirty | ( | ) |
setDirty() -> self Mark the data for this parameter as dirty. This will force the parameter to report that it has been changed the next time it is accessed. This allows external events (e.g. device lost, texture management, etc) to force a shader to re-set parameters tied to externally managed resources.
def OpenMayaRender.MUniformParameter.setFloat | ( | ) |
setFloat(value) -> self Set the value of this uniform parameter as a float. Note that it is not possible to set shape-dependent parameters. * value (float) - the new float value for this parameter.
def OpenMayaRender.MUniformParameter.setFloatArray | ( | ) |
setFloatArray(value) -> self Set the value of this uniform parameter as one or more floating point values. Note that it is not possible to set shape-specific parameters. * value (tuple of floats) - a tuple of floats holding the new floating point value(s) for this parameter.
def OpenMayaRender.MUniformParameter.setInt | ( | ) |
setInt(value) -> self Set the value of this uniform parameter as an integer value. Note that it is not possible to set shape-dependent parameters. * value (int) - the new value for this parameter.
def OpenMayaRender.MUniformParameter.setString | ( | ) |
setString(value) -> self Set the value of this uniform parameter as a string. Note that it is not possible to set shape-dependent parameters. * value (string) - the new string value for this parameter.
def OpenMayaRender.MUniformParameter.source | ( | ) |
source() -> MPlug Get the source plug connected to this parameter. Other than textures, this will typically be an invalid plug.
def OpenMayaRender.MUniformParameter.type | ( | ) |
type() -> int Get the type of this parameter. Available values: kTypeUnknown, kTypeBool, kTypeInt, kTypeFloat, kType1DTexture, kType2DTexture, kType3DTexture, kTypeCubeTexture, kTypeEnvTexture, kTypeString, kTypeEnum
def OpenMayaRender.MUniformParameter.userData | ( | ) |
userData() -> int Get the user data for this parameter. User data can be used to store plugin specific information that you want to associate with this parameter. Typically this will be used to store a handle to the effect parameter.
|
static |
The field names of an enum attribute.
|
static |
The keyable state of this parameter
|
static |
The hard range upper bound for a numeric uniform parameter.
|
static |
The hard range lower bound for a numeric uniform parameter.
|
static |
The soft range upper bound for a numeric uniform parameter.
|
static |
The soft range lower bound for a numeric uniform parameter.
|
static |
The hidden state of this parameter
|
static |
The UI Nice Name for the attribute.