- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends

# MPxBakeEngine Class Reference

# OpenMaya - API module for common classes | Proxy classes

Search for all occurrences

## Detailed Description

Baking functionality.

The MPxBakeEngine class is a way for users to override the viewport representation of shaders. Users can provide their own baking engine to bake advanced shading properties into a texture. This texture is used by the viewport to represent the shading properties.

`#include <MPxBakeEngine.h>`

List of all members.

## Public Member Functions
| MPxBakeEngine ()
| Constructor.
virtual | ~MPxBakeEngine ()
| The class destructor.
void | setNeedTransparency (bool t)
| Set whether the bake engine needs to produce an image with transparency.
void | getUVRange (MFloatArray minUV, MFloatArray maxUV)
| Tells Maya the UV range the baked texture should cover.
virtual MStatus | bake (const MDagPath &objectPath, const MDagPath &cameraPath, const MPlug &samplePlug, MImage &bakeResult)=0
| Bake the texture Maya will use to approximate shading properties.
## Friends
class | MFnPlugin Search for all occurrences

## Member Function Documentation

void setNeedTransparency | ( | bool | t | ) |

Search for all occurrences

Set whether the bake engine needs to produce an image with transparency.

Parameters:

  [in] | t | whether transparency is needed

void getUVRange | ( | MFloatArray | minUV,
|  | MFloatArray | maxUV
| ) |  |

Search for all occurrences

Tells Maya the UV range the baked texture should cover.

Parameters:

  [out] | minUV | the minimum UV value
  [out] | maxUV | the maximum UV value

MStatus bake | ( | const MDagPath & | objectPath,
|  | const MDagPath & | cameraPath,
|  | const MPlug & | samplePlug,
|  | MImage & | result
| ) |  | `[pure virtual]`

Search for all occurrences

Bake the texture Maya will use to approximate shading properties.

Parameters:

  [in] | objectPath | the object the texture will be applied to
  [in] | cameraPath | the camera that should be used for baking
  [in] | samplePlug | the plug being sampled, ie baked
  [out] | result | the texture

Returns:
  MS::kSuccess if a valid texture was created, MS::kFailure otherwise

MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine
MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine MPxBakeEngine