This example shows how to implement a custom filter as a self-installing plug-in. Softimage installs the custom filter at startup and automatically adds it to the filter menu in the Select panel of the main command area. When Simple Filter is the active selection filter, you cannot select polygon meshes with less than fifty vertices.
The example includes JScript, Python, VBScript, and C++ versions of the filter. A more advanced C# filter called Triangle Filter is also included here. You can find more examples of custom filters in the %XSISDK_ROOT%\Application\Filters folder.
| Location | |
| Files | 
						 simplejsfilter.js 
						simplepyfilter.py 
						simplevbsfilter.vbs 
						simplefilter.cpp 
						GNUmakefile 
						simplefilter.vcproj 
						CSTriangleFilter.cs 
						CSTriangleFilter.csproj 
					 | 
				
To install the example
Connect to the Softimage SDK workgroup at %XSISDK_ROOT%\examples\workgroup.
,
						locate the workgroup folder and then click Select.To view the help page for an example
								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 example
In the Select panel, click 
 to
							display the list of filters.
						Softimage SDK includes a compiled version of SimpleFilter. 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 SimpleFilter project from the command line, type:
devenv SimpleFilter.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
Softimage SDK includes a compiled version of C# Triangle Filter. 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 CSTriangleFilter project from the command line, type:
devenv cssrc_TriangleFilter\CSTriangleFilter.csproj
					This example uses the following keywords:
C++, JScript, Python, VBScript, C++ example, JScript example, Python example, VBScript example, RegisterFilter, siFilter3DObject, X3DObject, IsA, siX3DObjectID, siPrimitiveID, SIObject, GetParent, Match, Context, GetAttribute, Input, IsValid, GetActivePrimitive, GetGeometry, GetPoints, GetCount, Applicable, Subset, GetArrayAttribute, Input, PutArrayAttribute, PutUserData, GetUserData, CValue::siPtrType, Init, Reload, Term, ClassName