class MPxBakeEngine

Jump to documentation

Baking functionality. (OpenMaya) (OpenMayaMPx.py)

public members:

MPxBakeEngine ()
virtual ~MPxBakeEngine ()
void setNeedTransparency (bool t)
void getUVRange ( MFloatArray minUV, MFloatArray maxUV)
virtual MStatus bake (const MDagPath & objectPath, const MDagPath & cameraPath, const MPlug &samplePlug, MImage & bakeResult)

Documentation

Provide an interface for baking.

Description

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.

Functions

MPxBakeEngine:: MPxBakeEngine ()
Description Constructor.

MPxBakeEngine:: ~MPxBakeEngine ()

Description

The class destructor.

void MPxBakeEngine:: setNeedTransparency (bool t)

Description

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

Arguments

  • t whether transparency is needed

void MPxBakeEngine:: getUVRange ( MFloatArray minUV, MFloatArray maxUV)

Description

Tells Maya the UV range the baked texture should cover.

Arguments

  • minUV the minimum UV value

  • maxUV the maximum UV value

MStatus MPxBakeEngine:: bake (const MDagPath & objectPath, const MDagPath & cameraPath, const MPlug &samplePlug, MImage & result)

Description

Bake the texture Maya will use to approximate shading properties.

Arguments

  • objectPath the object the texture will be applied to

  • cameraPath the camera that should be used for baking

  • samplePlug the plug being sampled, ie baked

  • result the texture

Return Value

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

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright