This plug-in demonstrates how to use the change project event
(siOnChangeProject) in JScript and C#. The plug-in property page lists 3 projects
you can select through a radio button control. When a new selected
project is activated, the siOnChangeProject event callback activates a new
layout according to the activated project.
Location |
|
Files |
projectselector.js
CSProjectSelector.cs
|
Running the Example
To install the example
To view the help page for an example
-
Do one of the following:
-
In the Plug-in Tree, expand the SDK examples workgroup, right-click the example
add-on and then click Help.
-
Open a Net View and click
to go to Softimage Net local. In the top navigation bar, click add-ons,
and then click the SDK example add-on.
To run the JScript example
-
From the Project Selector menu located in the main menu bar, click
Launch Project Selector. The Project Selector PPG opens. You can
select one of the project below:
-
Default: Creates/activates a default project in the user
folder and activates the default Softimage layout.
-
Animation: Creates/activates an animation project in
the user folder and activates the Dual - Animation Softimage layout.
-
Compositing: Creates/activates
a compositing project in the user folder and activates the Dual
- Compositing Softimage layout.
To run the C# example
-
From the CSProjectSelector_Menu menu located in the main menu bar, click
Launch C# Project Selector. The Project Selector PPG opens. You can
select one of the project below:
-
Default: Creates/activates a default project in the user
folder and activates the default Softimage layout.
-
Animation: Creates/activates an animation project in
the user folder and activates the Dual - Animation Softimage layout.
-
Compositing: Creates/activates
a compositing project in the user folder and activates the Dual
- Compositing Softimage layout.
Building the C# Project Selector Example
Softimage SDK includes a compiled version of C# Project Selector. 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 XSI_HOME are set (otherwise you'll get build and link
errors).
Tip To load the
CSProjectSelector
project from the command line, type:
devenv cssrc\CSProjectSelector.csproj
- In Visual Studio .NET, open the project file .csproj.
- Select a configuration (Release or Debug) and build the DLL.
Keywords
This example uses the following keywords:
JScript, RegisterEvent, siOnChangeProject, Project, ActivePRoject, Layout,
ActiveLayout.