A suite of methods provide the ability for a script to invoke Editable Spline, Line, and Edit Spline Modify panel modes and operations, corresponding to buttons available at various shape sub-object levels. These methods reside in the splineOps
global structure. These methods effectively "push the button" in the Modify panel. In order to use these methods, the node must be selected and the Modify panel open. In the description of these methods, the first argument <editable_spline_or_line_node_or_modifier>
should be interpreted as either an Editable Spline or Line node where the modifier stack level is at the base object, or an Edit Spline modifier where the modifier stack level is at the Edit Spline. In all cases, the following methods work at the current sub-object level, but only if that level is appropriate for the invoked operation.
If you have made scripted changes to the shape you must call the updateShape()
method on the mesh before calling these methods. You do not need to call updateShape()
after just calling one of these methods, as 3ds Max will take care of updating the shape.
The following methods invoke one of the 'user-interaction' button operations in the Editable Spline Modify panel, acting on the currently selected sub-objects. These methods highlight the corresponding button in the Geometry rollout and start the operation, at which point the user interactively completes the operation. These methods return after starting the operation, and before the user completes the operation, so care should be taken to ensure that your script does not interfere with the operation. Invoking any of these methods is the same as clicking on the associated button in the Modify panel. Calling a method when the operation is already in effect (either due to a user action or a MAXScript command) causes the operation to be terminated and the highlight is removed from the button.
splineOps.startUnion <editable_spline_or_line_node_or_modifier>
Enters "Boolean Union" command mode - valid in Spline Sub-Object level.
Only 1 closed spline must be selected to enter this command mode.
splineOps.startSubtract <editable_spline_or_line_node_or_modifier>
Enters "Boolean Subtract" command mode - valid in Spline Sub-Object level.
Only 1 closed spline must be selected to enter this command mode.
splineOps.intersect <editable_spline_or_line_node_or_modifier>
Enters "Boolean Intersect" command mode - valid in Spline Sub-Object level.
Only 1 closed spline must be selected to enter this command mode.
splineOps.startAttach <editable_spline_or_line_node_or_modifier>
Enters "Attach" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.
splineOps.startBind <editable_spline_or_line_node_or_modifier>
Enters "Bind" command mode - valid in Vertex Sub-Object level.
splineOps.startBreak <editable_spline_or_line_node_or_modifier>
Enters "Break" command mode - valid in Vertex and Segment Sub-Object levels.
splineOps.startChamfer <editable_spline_or_line_node_or_modifier>
Enters "Chamfer" command mode - valid in Vertex Sub-Object level.
splineOps.startConnect <editable_spline_or_line_node_or_modifier>
Enters "Connect" command mode - valid in Vertex Sub-Object level.
splineOps.startCreateLine <editable_spline_or_line_node_or_modifier>
Enters "Create Line" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.
splineOps.startCrossInsert <editable_spline_or_line_node_or_modifier>
Enters "CrossInsert" command mode - valid in Vertex Sub-Object level.
splineOps.startExtend <editable_spline_or_line_node_or_modifier>
Enters "Extend" command mode - valid in Spline Sub-Object level.
splineOps.startFillet <editable_spline_or_line_node_or_modifier>
Enters "Fillet" command mode - valid in Vertex Sub-Object level.
splineOps.startInsert <editable_spline_or_line_node_or_modifier>
Enters "Insert" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.
splineOps.startOutline <editable_spline_or_line_node_or_modifier>
Enters "Outline" command mode - valid in Spline Sub-Object level.
splineOps.startRefine <editable_spline_or_line_node_or_modifier>
Enters "Refine" command mode - valid in Vertex and Segment Sub-Object levels.
This method does not turn off the Connect checkbox, so it is effectively the same as the startRefineConnect()
method.
splineOps.startRefineConnect <editable_spline_or_line_node_or_modifier>
Enters "Refine" command mode - valid in Vertex and Segment Sub-Object levels. This method does not turn on the Connect checkbox, so it is effectively the same as the startRefine()
method.
splineOps.startTrim <editable_spline_or_line_node_or_modifier>
Enters "Trim" command mode - valid in Spline Sub-Object level.
splineOps.startCopyTangent <editable_spline_or_line_node_or_modifier>
Enters "Copy Tangent" command mode - valid in Vertex Sub-Object level.
splineOps.startPasteTangent <editable_spline_or_line_node_or_modifier>
Enters "Paste Tangent" command mode - valid in Vertex Sub-Object level.
The following methods invoke one of the 'instantaneous' button operations in the Editable Shape Modify panel, acting on the currently selected sub-objects:
splineOps.attachMultiple <editable_spline_or_line_node_or_modifier>
Displays Attach Multiple dialog allowing the user to select multiple shapes to attach.
Valid in all Sub-Object levels, and when not in Sub-Object mode.
splineOps.close <editable_spline_or_line_node_or_modifier>
Closes the selected splines - valid in Spline Sub-Object level.
splineOps.cycle <editable_spline_or_line_node_or_modifier>
Cycles through the vertices of the spline, selecting each vertex. At least one vertex must be selected before calling this method, or no vertex is selected.
If more than one vertex is selected when this method is called, the first vertex of the first shape is selected.
Valid in Vertex Sub-Object level.
splineOps.delete <editable_spline_or_line_node_or_modifier>
Deletes the selected sub-objects - valid in all Sub-Object levels.
splineOps.detach <editable_spline_or_line_node_or_modifier>
Displays Detach dialog allowing the user to specify an object name.
Valid in all Sub-Object levels.
splineOps.divide <editable_spline_or_line_node_or_modifier>
Divides the selected segments - valid in Segment Sub-Object level.
splineOps.explode <editable_spline_or_line_node_or_modifier>
Explodes the each segment in the selected splines into separate splines or objects.
Valid in Spline Sub-Object level.
splineOps.fuse <editable_spline_or_line_node_or_modifier>
Fuses the selected vertices.
Valid in Vertex Sub-Object level.
splineOps.hide <editable_spline_or_line_node_or_modifier>
Hides the selected sub-objects - valid in all Sub-Object levels.
splineOps.makeFirst <editable_spline_or_line_node_or_modifier>
Makes the selected vertices the first vertex in the spline- valid in Vertex Sub-Object level.
splineOps.mirrorBoth <editable_spline_or_line_node_or_modifier>
Mirrors the selected splines horizontally and vertically - valid in Spline Sub-Object level.
splineOps.mirrorHoriz <editable_spline_or_line_node_or_modifier>
Mirrors the selected splines horizontally - valid in Spline Sub-Object level.
splineOps.mirrorVert <editable_spline_or_line_node_or_modifier>
Mirrors the selected splines vertically - valid in Spline Sub-Object level.
splineOps.reverse <editable_spline_or_line_node_or_modifier>
Reverses the order of vertices in the selected splines - valid in Spline Sub-Object level.
splineOps.selectByID <editable_spline_or_line_node_or_modifier>
Presses the Select ID button
splineOps.unbind <editable_spline_or_line_node_or_modifier>
Unbinds the selected vertices - valid in Vertex Sub-Object level.
splineOps.unhideAll <editable_spline_or_line_node_or_modifier>
Unhides all hidden sub-objects -valid in all Sub-Object levels, and when not in Sub-Object mode.
splineOps.weld <editable_spline_or_line_node_or_modifier>
Welds the selected vertices - valid in Vertex Sub-Object level.