This example shows how to add custom menus in Softimage. The example includes JScript, Python, VBScript, and C++ versions.
Location | |
Files |
simplejsmenu.js
simplepymenu.py
simplevbsmenu.vbs
simplemenu.cpp
GNUmakefile
simplemenu.vcproj
|
To install the example
Connect to the Softimage SDK workgroup at %XSISDK_ROOT%\examples\workgroup.
To view the help page for an 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:
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
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
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++, 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