Introduced
1.5
Description
Adds a point to the new polygon being created.
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
AddPointToNewPolygon( InputObj, X, Y, Z, [InsertPosition], [PolygonID] )
Parameters
|
Parameter |
Type |
Description |
|
InputObj |
Mesh object holding the polygon being built |
|
|
X |
X coordinate |
|
|
Y |
Y coordinate |
|
|
Z |
Z coordinate |
|
|
InsertPosition |
Ordinal of the vertex where to insert the new point in the polygon Default Value: 0 Possible Values: • 0: The point is added at the end of the list • 0<i<N: The point is inserted between vertices i-1 and i |
|
|
PolygonID [out] |
ID of the polygon affected (-1 is returned if polygon has less than 3 points) |
Return Value
Returns the ID of the newly created point as a Long.
Examples
VBScript Example
' Create a triangle dim obj, poly SIGetPrim "EmptyPolygonMesh", , , , obj SelectObj obj ApplyOp "CreatePolygon", obj, siUnspecified AddPointToNewPolygon obj, -2.229, 2.713, 0.000 AddPointToNewPolygon obj, -3.140, -1.686, 0.000 AddPointToNewPolygon obj, 1.744, -2.345, 0.000, , poly SelectObj obj & ".poly[" & poly & "]"
See Also
Autodesk Softimage v7.5