Simple Menu

This example shows how to add custom menus in Softimage. The example includes JScript, Python, VBScript, and C++ versions.

Example Files


Running the Example

To run the example

The VBScript, Python and JScript versions of the plug-in each add a More menu item to the Get > Primitive > Polygon Mesh menu in the Model toolbar. The More menus contain more menu items for creating meshes. Both plug-ins also add a menu item to the Help menu on the main Softimage menubar. The help menu items display this page in a NetView window.

The C++ version of the plug-in adds the following menu items:

  • On the Model toolbar:
    • Modify > Deform > Simple Deform Menu
      Applies a deformation operator to a polygon mesh
  • On the main Softimage menubar:
    • File > Simple Save Scene
    • File > Simple Load Project
    • File > Export > Simple Export
    • File > Import > Simple Import
    • Window > Cascades
      arranges floating windows in an overlapping cascade so you can see all title bars
    • Help > C++ Simple Help Menu
  • On the context menu in a 3D view or the explorer for a polygon cluster:
    • Log Cluster Polygon

Building the C++ Example

Softimage SDK includes a compiled version of SimpleMenu. 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 SimpleMenu project from the command line, type:

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

To build the example on Linux

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

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

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

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



This example uses the following keywords:

C++, JScript, Python, VBScript, C++ example, JScript example, Python example, VBScript example, RegisterMenu, Init, AddCallbackItem, Menu, MenuItem, Layout, GetDesktop, GetActiveLayout, CRefArray, GetViews, GetFloating, Move, PutState, CreateView, netview, CStatus, Succeeded, GetCode, Plugins, GetPlugins, AddCommandItem, siMenuItemSubmenu, PutFilter, ExecuteCommand, GetActivePrimitive, GetGeometry, IsA, siPolygonMeshID, SetAttributeValue, url