Creating C# Plug-ins

The recommended way to get started developing a C# self-installing plug-in is to use one of the Softimage SDK wizards to generate the initial code (.cs) and a Visual C# project (.csproj). Using the wizards ensures that your development environment is set up correctly.

We also recommend using Add-on directories to store both the source code and the compiled plug-in. For example, take a look at the SDK example workgroup, where each example is stored in a separate Add-on directory.

 

The C# examples put their source code in a cssrc folder.

To generate the C# code for plug-ins

1. Click File > Plug-ins to open the Plug-in Manager.

 

In the Tools Development Environment layout, click the Plug-ins tab to switch to the Plug-in Manager view.

2. Do one of the following:

- To create the property in a workgroup or an Add-on directory, expand the location in the Plug-in Tree, right-click the Plugins folder, click New, and then choose Command, Operator, Property, Event, or, for any other type of plug-in, Empty Plug-in.

- To create the plug-in in the User location, click File > New, and then choose Command, Operator, Property, Event, or, for any other type of plug-in, Empty Plug-in.

The Plug-in Wizard appears.

3. In the Plug-in Name box, type a name for the plug-in.

The first character in a plug-in name should be a letter. Subsequent characters can be letters, numbers, underscore (_) characters, or spaces.

If you include spaces in the plug-in name, the wizard replaces the spaces with underscores when it creates the plug-in file.

4. In the Author box, type a name for the plug-in.

5. In the Script Language list, click C#.

 

6. Click OK to generate the code.

When you click the Generate <plug-in item> button, the wizard will generate a C# project file (.csproj) and a C# source file (.cs) that contains the code to register and create C# objects.

 

The wizard outputs the source and project files to the folder specified in the Output Directory text box, but Visual Studio .NET 2005 will compile the .dll in obj/Debug subfolder which Softimage finds automatically.

7. Edit and compile the code.

 

For more information about using C# with Softimage (and for a list of C# examples installed with Softimage), see Interacting with Softimage.



Autodesk Softimage v7.5