Installing Your Preset-Based Custom Operator in XSI

Legacy custom operators are almost “self-installing”. At startup, XSI scans the standard plug-in locations (such as the User location, workgroups, and custom locations specified by XSI_PLUGINS) for SPDL-based operators and automatically registers them.

We recommend that you do not use “xsi -i" to install SPDLs anymore; instead, let XSI automatically find and register operators. During development, put the operator SPDL and code in a local workgroup: XSI will install and register the operator when you connect to the workgroup.

You can manage SPDLs through the Plug-in Manager, including access to spdlcheck, the ability to generate presets, and drag-and-drop support for relocation.

About Installing Operators

When you save or install a custom operator in XSI, you are basically registering the SPDL file. In the case of a file-based scripted or compiled operator, the library file where the operator is implemented is referenced inside the SPDL file, so the implementation file itself doesn’t need to be explicitly registered. In the case of an embedded scripted operator, the implementation is embedded inside the SPDL, so once you’ve registered the SPDL you’re finished.

| SPDL files hold a reference to the filename alone (in other words, without a path or extension). This makes it very flexible, since you can use one SPDL file to control multiple implementation files. For example, you can include both a Linux and Windows version of the same library in a distribution package. Note that in order for XSI to find the script or library file referenced in the SPDL’s Filename entry, the file must use that exact filename base and must reside in the same directory as its SPDL file. When you manually install the SPDL, XSI performs these activities: • Copies the SPDL file to the \Application\spdl directory under your user location • Creates a preset for it in the \DSPresets\Operators folder under your user location • For compiled operators, XSI also copies the library file to the \Application\bin folder under your user location using the subfolder that matches the platform: - For Linux, the folder is called linux-x86 - For Windows, the folder is called nt-x86

| If you update the SPDL file you need to regenerate the Preset file. This is done automatically when you uninstall and then reinstall a SPDL file (by using the command line xsi -u and xsi -i or by using the Plugins (SPDL) dialog.

Other Ways to Register

The recommend way to install and register operators is to put the operator in one of the standard plug-in locations:

• The User location (for example, C:\users\kima\Softimage\XSI_5.0)

• A workgroup

• A custom location specified by the XSI_PLUGINS environment variable

However, XSI still supports several other ways to install and register SPDLs.

Registering with the Scripted Operator Editor

If you are using the Scripted Operator Editor to create a custom scripted operator, you can use the editor to save a preset of your operator, which creates and registers the SPDL file automatically in XSI:

1. In the Scripted Operator Editor, choose File > Save.

2. Specify a file name and location in the browser. XSI creates and registers a SPDL file with the same name in the <user_location>\spdl directory.

Registering through the XSI Command Line

If you are not using the Scripted Operator Editor to create your custom operator, you can register the SPDL file using the XSI Command Prompt:

1. Open the XSI Command Prompt (you can use the shortcut link in the Softimage Products startup folder).

2. From the prompt, run the following command:

           xsibatch -i <op_name>.spdl

| If you need to reinstall the SPDL, you can run the following at the command prompt:
           xsibatch -u <op_name>.spdl
           xsibatch -i <op_name>.spdl
This sequence uninstalls and reinstalls the SPDL file.

| If a custom operator is installed on a workgroup (for example, using xsi -i <spdl> -dest workgroup, then all users of that workgroup will sutomatically have access to that operator the next time they restart XSI.

Registering through the Plug-ins (SPDL) Dialog in XSI

You can register a single SPDL file in XSI by using the Plug-ins (SPDL) dialog, which allows you to select a SPDL file from any location. For example, if you used MSDev to author your custom operator, you can install the SPDL file directly from your project directory (such as C:\Program Files\Microsoft Visual Studio\MyProjects\your_project):

1. To open the dialog, choose File > Add-On > Plugins (SPDL) in XSI.

2. Click the Install button to open the Install SPDL window.

3. Click the browse button beside the SPDL File Path box to select a SPDL file from the browser or type the location of the SPDL file manually.

4. Click the Install button. The execution log displays the results of the installation.

5. Click Done in the Install SPDL window to return to the Plugins (SPDL) window.

6. Click Done in the Plugins (SPDL) window to finish. Your SPDL and implementation files are copied to the Application/spdl folder under your user location.