This example is the source code for the VertexColors plug-in included with Softimage. This plug-in uses a custom display to implement a tool for creating and editing vertex colors on a polygon mesh.
Note This example uses the Windows API and is not available on Linux.
Location | |
Files |
BakeLights.cpp
BakeLights.h
BakeRenderTree.cpp
BakeRenderTree.h
Collapse.cpp
Collapse.h
ColorCorrection.cpp
ColorCorrection.h
CustomUI.cpp
CustomUI.h
Mix2Colors.cpp
Mix2Colors.h
VertexColorHelper.cpp
VertexColorHelper.h
VertexColorOperator.cpp
VertexColorOperator.h
VertexColors.cpp
VertexColors.h
VertexColors.vcproj
|
To run the example
- Or -
Run this code in the script editor:
var oActiveLayout = Application.Desktop.ActiveLayout; var oCDH = oActiveLayout.CreateView( "Custom Display Host", "MyCustomDisplayHost" ); oCDH.SetAttributeValue( "targetcontent", "VertexColorsExample" ); oCDH.Resize( 600, 500 );
Softimage SDK includes a compiled version of VertexColors. 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 VertexColors project from the command line, type:
devenv VertexColors.vcproj
This example uses the following keywords:
C++ example, RegisterCustomDisplay, Notify, Init, IsA, siViewContextID, ViewContext, IsValid, PutUserData, GetUserData, AddOperator, CSIBCArray, Primitive, IsValid, GetGeometry, ClusterProperty, CreateDialog, ViewContext, SendDlgItemMessage, siEventID, GetNotificationData, siOnSelectionChange, siOnValueChange, CValueChangeNotification, GetOwner, GetClassID, PolygonMesh, CSelectionChangeNotification, GetCurrentVertexColor, GetVertexColors, PutCurrentVertexColor, AddVertexColor, ClusterProperty, SetInstanceDataValue, SIConnectShaderToCnxPoint, CopyPaste