C++ API Reference
MPxBakeEngine Class Referenceabstract

Baking functionality. More...

#include <MPxBakeEngine.h>

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. More...
 
void getUVRange (MFloatArray minUV, MFloatArray maxUV)
 Tells Maya the UV range the baked texture should cover. More...
 
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. More...
 

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.

Member Function Documentation

void setNeedTransparency ( bool  t)

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

Parameters
[in]twhether transparency is needed
void getUVRange ( MFloatArray  minUV,
MFloatArray  maxUV 
)

Tells Maya the UV range the baked texture should cover.

Parameters
[out]minUVthe minimum UV value
[out]maxUVthe maximum UV value
MStatus bake ( const MDagPath objectPath,
const MDagPath cameraPath,
const MPlug samplePlug,
MImage result 
)
pure virtual

Bake the texture Maya will use to approximate shading properties.

Parameters
[in]objectPaththe object the texture will be applied to
[in]cameraPaththe camera that should be used for baking
[in]samplePlugthe plug being sampled, ie baked
[out]resultthe texture
Returns
MS::kSuccess if a valid texture was created, MS::kFailure otherwise

The documentation for this class was generated from the following files: