Python API 2.0 Reference
|
Public Member Functions | |
def | __init__ () |
def | bytesPerPixel () |
def | hasAlpha () |
def | hasTransparentAlpha () |
def | hasZeroAlpha () |
def | name () |
def | rawData () |
def | resourceHandle () |
def | setHasAlpha () |
def | setHasTransparentAlpha () |
def | setHasZeroAlpha () |
def | textureDescription () |
def | update () |
Static Public Member Functions | |
def | __new__ () |
def | freeRawData () |
Class which includes texture data.
def OpenMayaRender.MTexture.__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.MTexture.bytesPerPixel | ( | ) |
bytesPerPixel() -> int Get the number of bytes per pixel in the texture.
|
static |
freeRawData(long) -> None Deallocate system memory - retrieved from rawData().
def OpenMayaRender.MTexture.hasAlpha | ( | ) |
hasAlpha() -> bool Get whether the texture has an alpha channel.
def OpenMayaRender.MTexture.hasTransparentAlpha | ( | ) |
hasTransparentAlpha() -> bool Get whether the texture has semi-transparent texels.
def OpenMayaRender.MTexture.hasZeroAlpha | ( | ) |
hasZeroAlpha() -> bool Get whether the texture has any texels with an alpha value of 0.0.
def OpenMayaRender.MTexture.name | ( | ) |
name() -> string Get the name of the texture.
def OpenMayaRender.MTexture.rawData | ( | ) |
rawData() -> (long, rowPitch, slicePitch) Returns a long containing a C++ 'void' pointer which points to the raw data mapped to the texture. The caller must deallocate the system memory (using freeRawData()) as the texture itself does not keep any references to it. * rowPitch [OUT] (int) - The row pitch of the data. It represents the number of bytes of one line of the texture data. * slicePitch [OUT] (int) - The slice pitch of the data. It represents the number of bytes of the whole texture data.
def OpenMayaRender.MTexture.resourceHandle | ( | ) |
resourceHandle() -> long Returns a long containing a C++ 'void' pointer which points to the texture.
def OpenMayaRender.MTexture.setHasAlpha | ( | ) |
setHasAlpha(bool) -> self Specify that the texture has an alpha channel.
def OpenMayaRender.MTexture.setHasTransparentAlpha | ( | ) |
setHasTransparentAlpha(bool) -> self Specify that the texture has texels with an alpha value greater than or equal to 0.0 and less than 1.0.
def OpenMayaRender.MTexture.setHasZeroAlpha | ( | ) |
setHasZeroAlpha(bool) -> self Specify that the texture has texels with an alpha value of 0.0.
def OpenMayaRender.MTexture.textureDescription | ( | ) |
textureDescription() -> MTextureDescription Get texture description.
def OpenMayaRender.MTexture.update | ( | ) |
update(pixelData, generateMipMaps, rowPitch=0, region=None) -> self update(image, generateMipMaps) -> selfupdate(textureNode) -> self Update the contents of an image with new data. From pixel data: * pixelData (void*) - Data to update the texture with. * generateMipMaps (bool) - Indicate if mip-maps levels for the texture be rebuilt. * rowPitch (int) The row pitch of the incoming data. * region (MTextureUpdateRegion) - Texture sub-region to update. If a None is passed in then the input data is assumed to be updating the entire texture. From an image: * image (MImage) - Image containing data to update the texture with. * generateMipMaps (bool) - Indicate if mip-maps levels for the texture be rebuilt. From a texture node: * textureNode (MObject) - File texture node