IVertexPaint Class Reference
 
 
 
IVertexPaint Class Reference

#include <istdplug.h>

Inheritance diagram for IVertexPaint:
FPMixinInterface FPInterface BaseInterface InterfaceServer MaxHeapOperators IVertexPaint_R7

Class Description

The IVertexPaint interface provides a way to set the vertex colors held in a VertexPaint modifier.

The interface can be obtained as follows:

 ReferenceTarget* vertexPaintMod = ...;
 IVertexPaint* ivertexPaint = (IVertexPaint*)vertexPaintMod->GetInterface(IVERTEXPAINT_INTERFACE_ID);
Note:
The class ID for the new VertexPaint in R6 and up is PAINTLAYERMOD_CLASS_ID, different from the legacy modifier. The legacy modifier does not support IVertexPaint

Classes

struct   FaceColor

Public Types

typedef Tab< Color * >  VertColorTab
typedef Tab< FaceColor * >  FaceColorTab
typedef
IAssignVertexColors::Options 
Options

Public Member Functions

virtual int  SetColors (INode *node, VertColorTab &vertColors)=0
  Set the colors by providing one color per vert.
virtual int  SetColors (INode *node, FaceColorTab &faceColors)=0
  Set colors by providing three colors per triangle.
virtual void  GetOptions (Options &options)=0
  The Get/SetOptions() methods control the parameters used for the lighting calculation, as shown in the UI of the utility.
virtual void  SetOptions (Options &options)=0
  The Get/SetOptions() methods control the parameters used for the lighting calculation, as shown in the UI of the utility.

Member Typedef Documentation


Member Function Documentation

virtual int SetColors ( INode node,
VertColorTab vertColors 
) [pure virtual]

Set the colors by providing one color per vert.

If the vertex paint modifier is applied on a poly object, you should provide colors based on the tri-mesh version of the object, as this is the object-type operated on by the modifier.

Parameters:
[in] node The node to apply the vertex painting to
[in] vertColors A table of colors, this should supply one for each vertex
Returns:
0 if the colors could not be applied, else 1
virtual int SetColors ( INode node,
FaceColorTab faceColors 
) [pure virtual]

Set colors by providing three colors per triangle.

If the vertex paint modifier is applied on a poly object, you should provide colors based on the tri-mesh version of the object, as this is the object-type operated on by the modifier.

Parameters:
[in] node The node to apply the vertex painting to
[in] faceColors A table of face colors, each with 3 colors for each vertex.
Returns:
0 if the colors could not be applied, else 1
virtual void GetOptions ( Options options ) [pure virtual]

The Get/SetOptions() methods control the parameters used for the lighting calculation, as shown in the UI of the utility.

virtual void SetOptions ( Options options ) [pure virtual]

The Get/SetOptions() methods control the parameters used for the lighting calculation, as shown in the UI of the utility.