This example shows how to create an self-installed operator that reads from many vertex color properties and writes a 'processed' result to a vertex color property acting as the mixed result. The code shows how to implement port group instances, an advanced feature that allows you to connect many objects to the same port group, in this case "Group_1".
Location | |
Files |
DemoVertexColorMixer.js
vertexcolormixer.cpp
GNUmakefile
vertexcolormixer.vcproj
|
To run the example
Softimage SDK includes a compiled version of VertexColorMixer. If you want to modify the code, you can rebuild the example by following these instructions.
To build the example on Windows
Open an Softimage command prompt, and type devenv to start Visual Studio .NET.
Starting Visual Studio .NET from an Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).
Tip To load the VertexColorMixer project from the command line, type:
devenv VertexColorMixer.vcproj
To build the example on Linux
In a shell (tcsh) window, type:
source $XSI_HOME/.xsi_<xsi_version>
Change directories to
cppsrc
To remove all intermediate files before building the example, run this command:
gmake clean
To compile the example, run this command:
gmake
This example uses the following keywords:
C++ example, OperatorContext, OutputPort, ClusterProperty, PutUserData, CValue::siPtrType, GetUserData, Update, Operator, GetOperator, GetNumInstancesInGroup, GetNumPortsInGroup, Port, GetPortAt, GetPortType, siPortInput, InputPort, GetValue, CValue::siRef, ClusterProperty.GetType, vertexcolor, GetElements, JScript, RegisterCommand, Execute, CreateVertexColorSupport, ApplyOp, MakeLocal, siDefaultPropagation, SetInstanceDataValue, CAV, SelectObj, PaintVertexColorTool, PaintVertexColors