Introduced
1.0
Description
Snaps boundaries between two Nurbs surfaces. Snapping boundaries constrains the control points on the boundary of one surface to the matching control points on the boundary of another. This is the equivalent of using the ApplyOp command with the SnapFace operator.
Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference. Normally you can get the output arguments via either XSIApplication.ExecuteCommand method (C#) or the ISIVTCollection (scripting languages), but this command already returns a value.
The only available workaround in this case is to create a VBScript custom command which returns both the output arguments and the return value in one array. For details, see What Happens when the Function Already Returns a Value?.
Scripting Syntax
ApplySnapFaceOp( [ConnectionSet], [ConnectType], [ImmediateMode], [OutputObjs] )
Parameters
|
Parameter |
Type |
Description |
|
ConnectionSet [in/out] |
Specifies the objects connected to the operator. See Operator Presets for details on the connection set required for this operator. Default Value: Currently selected objects are used as the main group. Warning: An error occurs if the connection set is invalid. Please verify the connection set required for this operator to avoid breaking your scripts. |
|
|
ConnectType |
Specifies the type of connection (node or branch). Default Value: siUnspecified |
|
|
ImmediateMode [in/out] |
Specifies whether or not the operator should be immediately frozen. Default Value: siPersistentOperation |
|
|
OutputObjs [out] |
Returns the created primitives. |
Return Value
Returns an XSICollection that contains the created snap face operators.
Examples
VBScript Example
' ' This example shows how to snap control points of two NURBS grids to ' make a big backwards Z in the camera viewport. ' newscene dim oLefty, oRighty ' Create two grids to snap. Name the grids in the scene explorer set oLefty = CreatePrim( "Grid", "NurbsSurface", "lefty" ) set oRighty = CreatePrim( "Grid", "NurbsSurface", "righty" ) Translate oRighty, 0, 5, 0, siAbsolute, siParent, siObj, siY ' Note that it is a border of oLefty that is moved onto a border of oRighty ApplySnapFaceOp oRighty & ".bndry[0];" & oLefty & ".bndry[2]"
See Also
Autodesk Softimage v7.5