VertexColors
 
 
 

Vertex Colors

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.

Example Files

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

Running the Example

To run the example

  • In a viewport, click the view name (for example, Top or Camera) and then choose Custom Displays > VertexColorsSDKExample.
  • - 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 );
    

Building the C++ Example

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

  1. 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
    
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Win32 Release or Win32 Debug) and build the DLL.

Keywords

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