Custom Tool Examples

This addon shows various self-installing custom tools.

AddSmoothEdgeLoopTool
This sample is the Model > Modify > Poly. Mesh > Add Smooth Edge Loop Tool that is shipped with Softimage.

SpotLightCreateTool
This sample demonstrates how to create a custom spotlight creation tool.

PickTestTool
This sample demonstrates how to use picking to identify objects under the cursor.

SnapTestTool
This sample demonstrates how to use snapping to identify objects under the cursor.

AnnotationTool
This sample demonstrates how to use a custom tool to pick and launch URL strings from an annotation object.

BoxTransformTool
This sample demonstrates how to create a complex manipulator-style tool that uses highlighting, shortcut keys, context menus and on-screen controls.

BoneCreateTool
This sample is the Model > Create > Skeleton > Draw Bones tool that is shipped with Softimage.

Example Files

Location
AddSmoothEdgeLoopTool Files
AddSmoothEdgeLoopTool.cpp
SpotLightCreateTool Files
SpotLightCreateTool.cpp
PickTestTool Files
PickTestTool.cpp
SnapTestTool Files
SnapTestTool.cpp
AnnotationTool Files
AnnotationTool.cpp
BoxTransformTool Files
BoxTransformTool.cpp
Constants.h
BBox.h
BBox.cpp
BoxTransformToolDelegate.h
ToolHandle.h
ToolHandle.cpp
TranslateToolHandle.h
TranslateToolHandle.cpp
ScaleToolHandle.h
ScaleToolHandle.cpp
RotateToolHandle.h
RotateToolHandle.cpp
RotateStickToolHandle.h
RotateStickToolHandle.cpp
RotateWheelToolHandle.h
RotateWheelToolHandle.cpp
DimensionToolHandle.h
DimensionToolHandle.cpp
ButtonToolHandle.h
ButtonToolHandle.cpp
ToolButton.h
ToolButton.cpp
BoneCreateTool Files
BoneCreateTool.cpp

Running the Examples

To run the AddSmoothEdgeLoopTool example

To run the SpotLightCreateTool example

To run the PickTestTool example

To run the SnapTestTool example

To run the AnnotationTool example

To run the BoxTransformTool example

To run the BoneCreateTool example

Building the Examples

Use the following instructions to build the CustomTool samples.

To build the AddSmoothEdgeLoopTool example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a 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 AddEdgeLoopTool project from the command line, type:

    devenv cppsrc_addsmoothedgelooptool\AddSmoothEdgeLoopTool.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the SpotLightCreateTool example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a 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 SpotLightCreateTool project from the command line, type:

    devenv cppsrc_spotlightcreatetool\SpotLightCreateTool.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the PickTestTool example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a 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 PickTestTool project from the command line, type:

    devenv cppsrc_picktesttool\PickTestTool.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the SnapTestTool example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a 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 SnapTestTool project from the command line, type:

    devenv cppsrc_snaptesttool\SnapTestTool.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the AnnotationTool example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a 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 AnnotationTool project from the command line, type:

    devenv cppsrc_annotationtool\AnnotationTool.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the BoxTransformTool example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a 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 BoxTransformTool project from the command line, type:

    devenv cppsrc_boxtransformtool\BoxTransformTool.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the BoneCreateTool example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a 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 BoneCreateTool project from the command line, type:

    devenv cppsrc_bonecreatetool\BoneCreateTool.vcxproj
  2. In Visual Studio .NET, open the project file .vcxproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the AddSmoothEdgeLoopTool example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_addsmoothedgelooptool
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the SpotLightCreateTool example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_spotlightcreatetool
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the PickTestTool example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_picktesttool
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the SnapTestTool example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_snaptesttool
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the AnnotationTool example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_annotationtool
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the BoxTransformTool example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_boxtransformtool
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the BoneCreateTool example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_bonecreatetool
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

Keywords

This example uses the following keywords:

ToolContext C++