Scripting Octopus

Basics – Part 4

Estimated reading: 29 minutes 819 views

The if Statement

So there is one thing in 3ds max that annoys most of the people. This is the irritating fact, that the Editble Poly object and the Edit Poly modifier is not the same type of object, so we cannot really use the same commands for both of them. Now here comes the if statement pretty handy, since using it, we can control our program based on what type of object we are editing.

Getting The Current Object

To do that, we have a very special command:

ModPanel.GetCurrentObject()

This little command can give us back the type of the object from the Modifier Panel. Typing this in into the listener and then hitting the enter, will return the type of our object.

If we have an Editable Poly object:

If we have an Edit Poly modifier:

Using The “ClassOf” Function

Well the above command has printed out something else in both cases, which is good because we can separate the program flow based on what we have. Using the “ClassOf” function we can get the class of the object and that’s it.

currentMod = ModPanel.GetCurrentObject()

if ClassOf(currentMod) == Edit_Poly then
(
    -- Do something if Edit_Poly
)
else if ClassOf(currentMod) == Editable_Poly then
(
    -- Do something else if it's an Editable_Poly
)	

Now we have separated the functionality based on what kind of object we have in the mod panel. Now let’s extend it a bit with some useful commands. Let’s implement a simple weld for example.

currentMod = ModPanel.GetCurrentObject()

if ClassOf(currentMod) == Edit_Poly then
(
	currentMod.weldVertexThreshold = {0}
	currentMod.ButtonOp #WeldVertex
)
else if ClassOf(currentMod) == Editable_Poly then
(
	currentMod.weldThreshold = {0}
	currentMod.weldFlaggedVertices ()
)

Now this may need a bit of explanation, but not that much. As you can see the commands we are calling in case of an Edit_Poly object, differs a bit from the Editable_Poly variant, even though they are doing the exact same thing. To get more info about what commands are available, we can call the “ShowInterfaces” command which will print out literally everything about a particular object type. (You can take a look at the result of the below command at the bottom of the page, for both Edit and Editable Poly objects.)

showInterfaces (ModPanel.GetCurrentObject())

The difference between the two classes is just only how you execute certain commands. Normally in an Editable Poly object you have a dedicated function/method for each command, while in an Edit Poly object you normally just triggering the button command using the name of the button and the ButtonOp function.

Now let’s feed our little script into the Command Panel, into Left or Right Click SPINNER. It will look like this.

Ok ok, but what is the result? Well it’s pretty simple. This one is a simple Weld that works on Edit and Editable Poly objects as well. You can see the result below.

The Result of “ShowInterfaces”

If you run the above command it will print out this: (Editable_Poly)

showinterfaces (ModPanel.GetCurrentObject())
  Interface: EditablePoly
   Properties:
    .edgeChamferType : enum : Read|Write
       edgeChamferType enums: {#Standard|#Quad}
    .edgeChamferQuadIntersections : boolean : Read|Write
   Methods:
    <boolean>Hide <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <boolean>unhideAll <enum>mnSelLevel
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    <void>namedSelCopy <string>Name
    <void>namedSelPaste <boolean>useRenameDialog
    <index>createVertex <point3>point pointInLocalCoords:<boolean> select:<boolean>
       pointInLocalCoords default value: true
       select default value: false
    <index>createEdge <index>vertex1 <index>vertex2 select:<boolean>
       select default value: false
    <index>createFace <index array>vertexArray select:<boolean>
       select default value: false
    <boolean>capHoles <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <boolean>delete <enum>mnSelLevel flags:<integer> deleteIsoVerts:<boolean>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
       deleteIsoVerts default value: true
    <void>attach <node>nodeToAttach <node>myNode
    <boolean>detachToElement <enum>mnSelLevel flags:<integer> keepOriginal:<boolean>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
       keepOriginal default value: false
    <boolean>splitEdges edgeFlags:<integer>
       edgeFlags default value: 1
    <boolean>breakVerts <integer>vertFlags
    <index>divideFace <index>faceID <&float array>vertexCoefficients select:<boolean>
       vertexCoefficients is In and Out parameter
       select default value: false
    <index>insertVertexInFace <index>faceID <&float array>vertexCoefficients select:<boolean>
       vertexCoefficients is In and Out parameter
       select default value: false
    <index>divideEdge <index>edgeID <float>proportion select:<boolean>
       select default value: false
    <index>insertVertexInEdge <index>edgeID <float>proportion select:<boolean>
       select default value: false
    <boolean>collapse <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <void>extrudeFaces <float>amount faceFlags:<integer>
       faceFlags default value: 1
    <void>bevelFaces <float>height <float>outline faceFlags:<integer>
       faceFlags default value: 1
    <void>chamferVertices <float>amount open:<boolean>
       open default value: false
    <void>chamferEdges <float>amount open:<boolean>
       open default value: false
    <boolean>slice <point3>slicePlaneNormal <point3>slicePlaneCenter flaggedFacesOnly:<boolean> faceFlags:<integer>
       flaggedFacesOnly default value: false
       faceFlags default value: 1
    <boolean>inSlicePlaneMode()
    <index>cutVertices <index>startVertex <point3>endPosition <point3>viewDirection
    <index>cutEdges <index>startEdge <float>startProportion <index>endEdge <float>endProportion <point3>viewDirection
    <index>cutFaces <index>startFace <point3>startPosition <point3>endPosition <point3>viewDirection
    <boolean>weldVerts <index>vertex1 <index>vertex2 <point3>destinationPoint
    <boolean>weldEdges <index>edge1 <index>edge2
    <boolean>weldFlaggedVertices vertexFlags:<integer>
       vertexFlags default value: 1
    <boolean>weldFlaggedEdges edgeFlags:<integer>
       edgeFlags default value: 1
    <boolean>createShape <string>shapeName <boolean>curved <node>myNode edgeFlags:<integer>
       edgeFlags default value: 1
    <boolean>makePlanar <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <boolean>moveToPlane <point3>planeNormal <float>planeOffset <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <boolean>alignToGrid <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <boolean>alignToView <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <boolean>deleteIsoVerts()
    <boolean>meshSmooth <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <boolean>tessellate <enum>mnSelLevel flags:<integer>
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       flags default value: 1
    <void>forceSubdivision()
    <void>setDiagonal <index>face <index>corner1 <index>corner2
    <boolean>retriangulate <integer>faceFlags
    <boolean>flipNormals <integer>faceFlags
    <void>selectByMaterial <index>materialID clearCurrentSelection:<boolean>
       clearCurrentSelection default value: true
    <void>selectBySmoothGroup <integer>smoothingGroups clearCurrentSelection:<boolean>
       clearCurrentSelection default value: true
    <void>autosmooth()
    <void>buttonOp <enum>buttonOpID
       buttonOpID enums: {#GrowSelection|#ShrinkSelection|#SelectEdgeLoop|#SelectEdgeRing|#HideSelection|#HideUnselected|#UnhideAll|#NamedSelectionCopy|#NamedSelectionPaste|#Cap|#Delete|#Remove|#Detach|#AttachList|#SplitEdges|#BreakVertex|#Collapse|#ResetSlicePlane|#Slice|#WeldSelected|#CreateShape|#MakePlanar|#AlignGrid|#AlignView|#RemoveIsoVerts|#MeshSmooth|#Tessellate|#Update|#SelectByVertexColor|#Retriangulate|#FlipNormals|#SelectByMatID|#SelectBySmoothingGroups|#Autosmooth|#ClearSmoothingGroups|#Extrude|#Bevel|#Inset|#Outline|#ExtrudeAlongSpline|#HingeFromEdge|#ConnectEdges|#ConnectVertices|#Chamfer|#Cut|#RemoveIsoMapVerts|#ToggleShadedFaces|#MakePlanarInX|#MakePlanarInY|#MakePlanarInZ|#Relax|#BridgeBorder|#BridgePolygon|#BridgeEdge|#PreserveUVSettings|#MakeHardEdges|#MakeSmoothEdges|#SelectHardEdges|#SelectSmoothEdges}
    <void>toggleCommandMode <enum>commandModeID
       commandModeID enums: {#CreateVertex|#CreateEdge|#CreateFace|#DivideEdge|#DivideFace|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#ChamferVertex|#ChamferEdge|#Bevel|#SlicePlane|#CutVertex|#CutEdge|#CutFace|#Weld|#EditTriangulation|#InsetFace|#QuickSlice|#HingeFromEdge|#PickLiftEdge|#OutlineFace|#EditSoftSelection|#TurnEdge}
    <void>enterPickMode <enum>pickModeID
       pickModeID enums: {#Attach|#PickShape}
    <void>exitCommandModes()
    <enum>GetCommandMode()
       GetCommandMode enums: {#CreateVertex|#CreateEdge|#CreateFace|#DivideEdge|#DivideFace|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#ChamferVertex|#ChamferEdge|#Bevel|#SlicePlane|#CutVertex|#CutEdge|#CutFace|#Weld|#EditTriangulation|#InsetFace|#QuickSlice|#HingeFromEdge|#PickLiftEdge|#OutlineFace|#EditSoftSelection|#TurnEdge
    <enum>GetPickMode()
       GetPickMode enums: {#Attach|#PickShape
    <boolean>getVerticesByFlag <&bitArray>vertexSet <integer>flagsRequested flagMask:<integer>
       vertexSet is In and Out parameter
       flagMask default value: 0
    <boolean>getEdgesByFlag <&bitArray>edgeSet <integer>flagsRequested flagMask:<integer>
       edgeSet is In and Out parameter
       flagMask default value: 0
    <boolean>getFacesByFlag <&bitArray>faceSet <integer>flagsRequested flagMask:<integer>
       faceSet is In and Out parameter
       flagMask default value: 0
    <void>setVertexFlags <&bitArray>vertexSet <integer>flagsToSet flagMask:<integer> generateUndoRecord:<boolean>
       vertexSet is In and Out parameter
       flagMask default value: 0
       generateUndoRecord default value: true
    <void>setEdgeFlags <&bitArray>edgeSet <integer>flagsToSet flagMask:<integer> generateUndoRecord:<boolean>
       edgeSet is In and Out parameter
       flagMask default value: 0
       generateUndoRecord default value: true
    <void>setFaceFlags <&bitArray>faceSet <integer>flagsToSet flagMask:<integer> generateUndoRecord:<boolean>
       faceSet is In and Out parameter
       flagMask default value: 0
       generateUndoRecord default value: true
    <void>resetSlicePlane()
    <void>getSlicePlane <&point3>planeNormal <&point3>planeCenter <&float>planeSize
       planeNormal is In and Out parameter
       planeCenter is In and Out parameter
       planeSize is In and Out parameter
    <void>setSlicePlane <&point3>planeNormal <&point3>planeCenter <float>planeSize
       planeNormal is In and Out parameter
       planeCenter is In and Out parameter
    <float>getVertexData <integer>vertexDataChannel <&integer>numberSelected <&boolean>uniformData vertexFlags:<integer>
       numberSelected is In and Out parameter
       uniformData is In and Out parameter
       vertexFlags default value: 1
    <float>getEdgeData <integer>edgeDataChannel <&integer>numberSelected <&boolean>uniformData edgeFlags:<integer>
       numberSelected is In and Out parameter
       uniformData is In and Out parameter
       edgeFlags default value: 1
    <void>setVertexData <integer>vertexDataChannel <float>value vertexFlags:<integer>
       vertexFlags default value: 1
    <void>setEdgeData <integer>edgeDataChannel <float>value edgeFlags:<integer>
       edgeFlags default value: 1
    <void>resetVertexData <integer>vertexDataChannel
    <void>resetEdgeData <integer>edgeDataChannel
    <void>beginModifyPerData <enum>mnSelLevel <integer>dataChannel
       mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    <boolean>inModifyPerData()
    <void>endModifyPerData <boolean>success
    <index>getMaterialIndex <&boolean>determined
       determined is In and Out parameter
    <void>setMaterialIndex <index>index <integer>faceFlags
    <void>getSmoothingGroups <integer>faceFlag <&integer>anyFaces <&integer>allFaces
       anyFaces is In and Out parameter
       allFaces is In and Out parameter
    <void>setSmoothingGroups <integer>bitValues <integer>bitMask <integer>faceFlags
    <void>collapeDeadStrctures()
    <void>collapseDeadStructures()
    <integer>propogateComponentFlags <enum>mnSelLevelTo <integer>flagSetTo <enum>mnSelLevelFrom <integer>flagTestFrom allBitsMustMatch:<boolean> set:<boolean> undoable:<boolean>
       mnSelLevelTo enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       mnSelLevelFrom enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       allBitsMustMatch default value: false
       set default value: true
       undoable default value: false
    <void>PreviewBegin <enum>previewOperation
       previewOperation enums: {#GrowSelection|#ShrinkSelection|#SelectEdgeLoop|#SelectEdgeRing|#HideSelection|#HideUnselected|#UnhideAll|#NamedSelectionCopy|#NamedSelectionPaste|#Cap|#Delete|#Remove|#Detach|#AttachList|#SplitEdges|#BreakVertex|#Collapse|#ResetSlicePlane|#Slice|#WeldSelected|#CreateShape|#MakePlanar|#AlignGrid|#AlignView|#RemoveIsoVerts|#MeshSmooth|#Tessellate|#Update|#SelectByVertexColor|#Retriangulate|#FlipNormals|#SelectByMatID|#SelectBySmoothingGroups|#Autosmooth|#ClearSmoothingGroups|#Extrude|#Bevel|#Inset|#Outline|#ExtrudeAlongSpline|#HingeFromEdge|#ConnectEdges|#ConnectVertices|#Chamfer|#Cut|#RemoveIsoMapVerts|#ToggleShadedFaces|#MakePlanarInX|#MakePlanarInY|#MakePlanarInZ|#Relax|#BridgeBorder|#BridgePolygon|#BridgeEdge|#PreserveUVSettings|#MakeHardEdges|#MakeSmoothEdges|#SelectHardEdges|#SelectSmoothEdges}
    <void>PreviewCancel()
    <void>PreviewAccept()
    <void>PreviewInvalidate()
    <boolean>PreviewOn()
    <void>PreviewSetDragging <boolean>dragging
    <boolean>PreviewGetDragging()
    <boolean>PopupDialog <enum>popupOperation
       popupOperation enums: {#GrowSelection|#ShrinkSelection|#SelectEdgeLoop|#SelectEdgeRing|#HideSelection|#HideUnselected|#UnhideAll|#NamedSelectionCopy|#NamedSelectionPaste|#Cap|#Delete|#Remove|#Detach|#AttachList|#SplitEdges|#BreakVertex|#Collapse|#ResetSlicePlane|#Slice|#WeldSelected|#CreateShape|#MakePlanar|#AlignGrid|#AlignView|#RemoveIsoVerts|#MeshSmooth|#Tessellate|#Update|#SelectByVertexColor|#Retriangulate|#FlipNormals|#SelectByMatID|#SelectBySmoothingGroups|#Autosmooth|#ClearSmoothingGroups|#Extrude|#Bevel|#Inset|#Outline|#ExtrudeAlongSpline|#HingeFromEdge|#ConnectEdges|#ConnectVertices|#Chamfer|#Cut|#RemoveIsoMapVerts|#ToggleShadedFaces|#MakePlanarInX|#MakePlanarInY|#MakePlanarInZ|#Relax|#BridgeBorder|#BridgePolygon|#BridgeEdge|#PreserveUVSettings|#MakeHardEdges|#MakeSmoothEdges|#SelectHardEdges|#SelectSmoothEdges}
    <void>ClosePopupDialog()
    <void>RepeatLastOperation()
    <integer>GetLastOperation()
    <void>GrowSelection selLevel:<enum>
       selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       selLevel default value: #CurrentLevel
    <void>ShrinkSelection selLevel:<enum>
       selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       selLevel default value: #CurrentLevel
    <integer>ConvertSelection <enum>fromSelLevel <enum>toSelLevel requireAll:<boolean>
       fromSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       toSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       requireAll default value: false
    <void>SelectBorder()
    <void>SelectElement()
    <void>SelectEdgeLoop()
    <void>SelectEdgeRing()
    <boolean>Remove selLevel:<enum> flag:<integer>
       selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       selLevel default value: #CurrentLevel
       flag default value: 1
    <boolean>DeleteIsoMapVerts()
    <boolean>Outline faceFlag:<integer>
       faceFlag default value: 1
    <boolean>ConnectEdges edgeFlag:<integer>
       edgeFlag default value: 1
    <boolean>ConnectVertices vertexFlag:<integer>
       vertexFlag default value: 1
    <boolean>ExtrudeAlongSpline faceFlag:<integer>
       faceFlag default value: 1
    <boolean>HingeFromEdge faceFlag:<integer>
       faceFlag default value: 1
    <void>ToggleShadedFaces()
    <boolean>Bridge selLevel:<enum> flag:<integer>
       selLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       selLevel default value: #CurrentLevel
       flag default value: 1
    <boolean>ReadyToBridgeFlagged selLevel:<enum> flag:<integer>
       selLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       selLevel default value: #CurrentLevel
       flag default value: 1
    <boolean>TurnDiagonal <index>face <index>diagonal
    <boolean>Relax selLevel:<enum> flag:<integer>
       selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       selLevel default value: #CurrentLevel
       flag default value: 1
    <boolean>MakePlanarIn <enum>axis selLevel:<enum> flag:<integer>
       axis enums: {#X|#Y|#Z}
       selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       selLevel default value: #CurrentLevel
       flag default value: 1
    <boolean>GetPreserveMap <integer>mapChannel
    <void>SetPreserveMap <integer>mapChannel <boolean>preserve
    <enum>GetEPolySelLevel()
       GetEPolySelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel
    <enum>GetMeshSelLevel()
       GetMeshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel
    <bitArray>GetSelection <enum>selectionLevel
       selectionLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    <void>SetSelection <enum>selectionLevel <bitArray>selection
       selectionLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    <integer>GetNumVertices()
    <point3>GetVertex <index>vertexID
    <integer>GetVertexFaceCount <index>vertexID
    <index>GetVertexFace <index>vertexID <index>face
    <integer>GetVertexEdgeCount <index>vertexID
    <index>GetVertexEdge <index>vertexID <index>edge
    <integer>GetNumEdges()
    <index>GetEdgeVertex <index>edgeID <index>end
    <index>GetEdgeFace <index>edgeID <index>side
    <integer>GetNumFaces()
    <integer>GetFaceDegree <index>faceID
    <index>GetFaceVertex <index>faceID <index>corner
    <index>GetFaceEdge <index>faceID <index>side
    <index>GetFaceMaterial <index>faceID
    <integer>GetFaceSmoothingGroups <index>faceID
    <integer>GetNumMapChannels()
    <boolean>GetMapChannelActive <integer>mapChannel
    <integer>GetNumMapVertices <integer>mapChannel
    <point3>GetMapVertex <integer>mapChannel <index>vertexID
    <integer>GetMapFaceVertex <integer>mapChannel <index>faceID <index>corner
    <index>GetMapFaceVert <integer>mapChannel <index>faceID <index>corner
    <void>setRingShift <integer>RingShiftValue <boolean>MoveOnly <boolean>Add
    <void>setLoopShift <integer>LoopShiftValue <boolean>MoveOnly <boolean>Add
    <integer>ConvertSelectionToBorder <enum>fromSelLevel <enum>toSelLevel
       fromSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       toSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    <void>CommitPaintDeform()
    <void>CancelPaintDeform()
    <boolean>GetCache_SystemOn()
    <void>SetCache_SystemOn <boolean>on
    <boolean>GetCache_SuspendDXCache()
    <void>SetCache_SuspendDXCache <boolean>suspend
    <integer>GetCache_Cutoff()
    <void>SetCache_Cutoff <integer>count
    <void>SetVertexColor <color>color <enum>Channel
       Channel enums: {#VertexColor|#Illumination|#Alpha}
    <void>SetFaceColor <color>color <enum>Channel
       Channel enums: {#VertexColor|#Illumination|#Alpha}
    <color>GetVertexColor <enum>Channel
       Channel enums: {#VertexColor|#Illumination|#Alpha}
    <color>GetFaceColor <enum>Channel
       Channel enums: {#VertexColor|#Illumination|#Alpha}
    <boolean>SmGrpFloaterVisible()
    <void>SmGrpFloater()
    <boolean>MatIDFloaterVisible()
    <void>MatIDFloater()
    <boolean>makeHardEdges <integer>flag
    <boolean>makeSmoothEdges <integer>flag
    <void>selectHardEdges()
    <void>selectSmoothEdges()
   Actions:
OK

When it comes to an Edit_Poly:

  Interface: EditPolyMod
   Properties:
    .edgeChamferType : enum : Read|Write
       edgeChamferType enums: {#Standard|#Quad}
    .edgeChamferQuadIntersections : boolean : Read|Write
   Methods:
    <enum>GetEPolySelLevel()
       GetEPolySelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel
       GetEPolySelLevel - no automatic redraw after invoked
    <enum>GetMeshSelLevel()
       GetMeshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel
       GetMeshSelLevel - no automatic redraw after invoked
    <void>SetEPolySelLevel <enum>selectionLevel
       selectionLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    <integer>ConvertSelection <enum>fromLevel <enum>toLevel requireAll:<boolean>
       fromLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       toLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       requireAll default value: false
    <enum>GetOperation()
       GetOperation enums: {#GrowSelection|#ShrinkSelection|#SelectEdgeLoop|#SelectEdgeRing|#GetStackSelection|#HideVertex|#HideFace|#HideUnselectedVertex|#HideUnselectedFace|#UnhideAllVertex|#UnhideAllFace|#NamedSelectionCopy|#NamedSelectionPaste|#Cap|#DeleteVertex|#DeleteEdge|#DeleteFace|#RemoveVertex|#RemoveEdge|#DetachVertex|#DetachFace|#SplitEdges|#BreakVertex|#CollapseVertex|#CollapseEdge|#CollapseFace|#ResetSlicePlane|#Slice|#SliceSelectedFaces|#Cut|#WeldVertex|#WeldEdge|#CreateShape|#MakePlanar|#MakePlanarInX|#MakePlanarInY|#MakePlanarInZ|#Align|#Relax|#MeshSmooth|#Tessellate|#Retriangulate|#FlipFace|#FlipElement|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#Bevel|#Inset|#Outline|#ExtrudeAlongSpline|#HingeFromEdge|#ConnectVertices|#ConnectEdges|#ChamferVertex|#ChamferEdge|#RemoveIsoVerts|#RemoveIsoMapVerts|#ToggleShadedFaces|#Transform|#Create|#Attach|#TargetWeldVertex|#TargetWeldEdge|#EditTriangulation|#TurnEdge|#CreateEdge|#CloneVertex|#CloneEdge|#CloneFace|#InsertVertexInEdge|#InsertVertexInFace|#Autosmooth|#SetSmooth|#SetMaterial|#SelectBySmooth|#SelectByMaterial|#BridgeBorder|#BridgePolygon|#BridgeEdge|#PreserveUVSettings|#RemoveEdgeRemoveVertices|#MakeHardEdges|#MakeSmoothEdges|#SelectHardEdges|#SelectSmoothEdges
       GetOperation - no automatic redraw after invoked
    <void>SetOperation <enum>operation
       operation enums: {#GrowSelection|#ShrinkSelection|#SelectEdgeLoop|#SelectEdgeRing|#GetStackSelection|#HideVertex|#HideFace|#HideUnselectedVertex|#HideUnselectedFace|#UnhideAllVertex|#UnhideAllFace|#NamedSelectionCopy|#NamedSelectionPaste|#Cap|#DeleteVertex|#DeleteEdge|#DeleteFace|#RemoveVertex|#RemoveEdge|#DetachVertex|#DetachFace|#SplitEdges|#BreakVertex|#CollapseVertex|#CollapseEdge|#CollapseFace|#ResetSlicePlane|#Slice|#SliceSelectedFaces|#Cut|#WeldVertex|#WeldEdge|#CreateShape|#MakePlanar|#MakePlanarInX|#MakePlanarInY|#MakePlanarInZ|#Align|#Relax|#MeshSmooth|#Tessellate|#Retriangulate|#FlipFace|#FlipElement|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#Bevel|#Inset|#Outline|#ExtrudeAlongSpline|#HingeFromEdge|#ConnectVertices|#ConnectEdges|#ChamferVertex|#ChamferEdge|#RemoveIsoVerts|#RemoveIsoMapVerts|#ToggleShadedFaces|#Transform|#Create|#Attach|#TargetWeldVertex|#TargetWeldEdge|#EditTriangulation|#TurnEdge|#CreateEdge|#CloneVertex|#CloneEdge|#CloneFace|#InsertVertexInEdge|#InsertVertexInFace|#Autosmooth|#SetSmooth|#SetMaterial|#SelectBySmooth|#SelectByMaterial|#BridgeBorder|#BridgePolygon|#BridgeEdge|#PreserveUVSettings|#RemoveEdgeRemoveVertices|#MakeHardEdges|#MakeSmoothEdges|#SelectHardEdges|#SelectSmoothEdges}
    <void>PopupDialog <enum>operation
       operation enums: {#GrowSelection|#ShrinkSelection|#SelectEdgeLoop|#SelectEdgeRing|#GetStackSelection|#HideVertex|#HideFace|#HideUnselectedVertex|#HideUnselectedFace|#UnhideAllVertex|#UnhideAllFace|#NamedSelectionCopy|#NamedSelectionPaste|#Cap|#DeleteVertex|#DeleteEdge|#DeleteFace|#RemoveVertex|#RemoveEdge|#DetachVertex|#DetachFace|#SplitEdges|#BreakVertex|#CollapseVertex|#CollapseEdge|#CollapseFace|#ResetSlicePlane|#Slice|#SliceSelectedFaces|#Cut|#WeldVertex|#WeldEdge|#CreateShape|#MakePlanar|#MakePlanarInX|#MakePlanarInY|#MakePlanarInZ|#Align|#Relax|#MeshSmooth|#Tessellate|#Retriangulate|#FlipFace|#FlipElement|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#Bevel|#Inset|#Outline|#ExtrudeAlongSpline|#HingeFromEdge|#ConnectVertices|#ConnectEdges|#ChamferVertex|#ChamferEdge|#RemoveIsoVerts|#RemoveIsoMapVerts|#ToggleShadedFaces|#Transform|#Create|#Attach|#TargetWeldVertex|#TargetWeldEdge|#EditTriangulation|#TurnEdge|#CreateEdge|#CloneVertex|#CloneEdge|#CloneFace|#InsertVertexInEdge|#InsertVertexInFace|#Autosmooth|#SetSmooth|#SetMaterial|#SelectBySmooth|#SelectByMaterial|#BridgeBorder|#BridgePolygon|#BridgeEdge|#PreserveUVSettings|#RemoveEdgeRemoveVertices|#MakeHardEdges|#MakeSmoothEdges|#SelectHardEdges|#SelectSmoothEdges}
    <void>ButtonOp <enum>operation
       operation enums: {#GrowSelection|#ShrinkSelection|#SelectEdgeLoop|#SelectEdgeRing|#GetStackSelection|#HideVertex|#HideFace|#HideUnselectedVertex|#HideUnselectedFace|#UnhideAllVertex|#UnhideAllFace|#NamedSelectionCopy|#NamedSelectionPaste|#Cap|#DeleteVertex|#DeleteEdge|#DeleteFace|#RemoveVertex|#RemoveEdge|#DetachVertex|#DetachFace|#SplitEdges|#BreakVertex|#CollapseVertex|#CollapseEdge|#CollapseFace|#ResetSlicePlane|#Slice|#SliceSelectedFaces|#Cut|#WeldVertex|#WeldEdge|#CreateShape|#MakePlanar|#MakePlanarInX|#MakePlanarInY|#MakePlanarInZ|#Align|#Relax|#MeshSmooth|#Tessellate|#Retriangulate|#FlipFace|#FlipElement|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#Bevel|#Inset|#Outline|#ExtrudeAlongSpline|#HingeFromEdge|#ConnectVertices|#ConnectEdges|#ChamferVertex|#ChamferEdge|#RemoveIsoVerts|#RemoveIsoMapVerts|#ToggleShadedFaces|#Transform|#Create|#Attach|#TargetWeldVertex|#TargetWeldEdge|#EditTriangulation|#TurnEdge|#CreateEdge|#CloneVertex|#CloneEdge|#CloneFace|#InsertVertexInEdge|#InsertVertexInFace|#Autosmooth|#SetSmooth|#SetMaterial|#SelectBySmooth|#SelectByMaterial|#BridgeBorder|#BridgePolygon|#BridgeEdge|#PreserveUVSettings|#RemoveEdgeRemoveVertices|#MakeHardEdges|#MakeSmoothEdges|#SelectHardEdges|#SelectSmoothEdges}
    <void>Commit()
    <void>CommitUnlessAnimating()
    <void>CommitAndRepeat()
    <void>Cancel()
    <bitArray>GetSelection <enum>meshSelLevel node:<node>
       GetSelection - no automatic redraw after invoked
       meshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       node default value: undefined
    <boolean>SetSelection <enum>meshSelLevel <&bitArray>newSelection node:<node>
       meshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       newSelection is In and Out parameter
       node default value: undefined
    <boolean>Select <enum>meshSelLevel <&bitArray>newSelection invert:<boolean> select:<boolean> node:<node>
       meshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       newSelection is In and Out parameter
       invert default value: false
       select default value: true
       node default value: undefined
    <void>SetPrimaryNode <node>node
    <void>ToggleCommandMode <enum>commandMode
       commandMode enums: {#CreateVertex|#CreateEdge|#CreateFace|#DivideEdge|#DivideFace|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#ChamferVertex|#ChamferEdge|#Bevel|#InsetFace|#OutlineFace|#SlicePlane|#Cut|#Weld|#EditTriangulation|#TurnEdge|#QuickSlice|#HingeFromEdge|#PickHinge|#BridgeBorder|#BridgePolygon|#PickBridgeTarget1|#PickBridgeTarget2|#EditSoftSelection}
    <void>EnterCommandMode <enum>commandMode
       commandMode enums: {#CreateVertex|#CreateEdge|#CreateFace|#DivideEdge|#DivideFace|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#ChamferVertex|#ChamferEdge|#Bevel|#InsetFace|#OutlineFace|#SlicePlane|#Cut|#Weld|#EditTriangulation|#TurnEdge|#QuickSlice|#HingeFromEdge|#PickHinge|#BridgeBorder|#BridgePolygon|#PickBridgeTarget1|#PickBridgeTarget2|#EditSoftSelection}
    <void>EnterPickMode <enum>commandMode
       commandMode enums: {#Attach|#PickShape}
    <enum>GetCommandMode()
       GetCommandMode enums: {#CreateVertex|#CreateEdge|#CreateFace|#DivideEdge|#DivideFace|#ExtrudeVertex|#ExtrudeEdge|#ExtrudeFace|#ChamferVertex|#ChamferEdge|#Bevel|#InsetFace|#OutlineFace|#SlicePlane|#Cut|#Weld|#EditTriangulation|#TurnEdge|#QuickSlice|#HingeFromEdge|#PickHinge|#BridgeBorder|#BridgePolygon|#PickBridgeTarget1|#PickBridgeTarget2|#EditSoftSelection
    <enum>GetPickMode()
       GetPickMode enums: {#Attach|#PickShape
    <void>RepeatLastOperation()
    <integer>GetLastOperation()
    <void>MoveSelection <point3>amount parent:<matrix3> axis:<matrix3> localOrigin:<boolean>
       parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       localOrigin default value: false
    <void>RotateSelection <quat>amount parent:<matrix3> axis:<matrix3> localOrigin:<boolean>
       parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       localOrigin default value: false
    <void>ScaleSelection <point3>amount parent:<matrix3> axis:<matrix3> localOrigin:<boolean>
       parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       localOrigin default value: false
    <void>MoveSlicePlane <point3>amount parent:<matrix3> axis:<matrix3>
       parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
    <void>RotateSlicePlane <quat>amount parent:<matrix3> axis:<matrix3> localOrigin:<boolean>
       parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       localOrigin default value: false
    <void>ScaleSlicePlane <point3>amount parent:<matrix3> axis:<matrix3> localOrigin:<boolean>
       parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
       localOrigin default value: false
    <boolean>InSlicePlaneMode()
       InSlicePlaneMode - no automatic redraw after invoked
    <void>ResetSlicePlane()
    <matrix3>GetSlicePlaneTM()
       GetSlicePlaneTM - no automatic redraw after invoked
    <void>SetSlicePlane <point3>planeNormal <point3>planeCenter
    <void>GetSlicePlane <&point3>planeNormal <&point3>planeCenter
       planeNormal is Out parameter
       planeCenter is Out parameter
    <index>CreateVertex <point3>point node:<node>
       node default value: undefined
    <index>CreateFace <index array>vertices node:<node>
       node default value: undefined
    <index>CreateEdge <index>vertex1 <index>vertex2 node:<node>
       node default value: undefined
    <void>SetDiagonal <index>vertex1 <index>vertex2 node:<node>
       node default value: undefined
    <void>StartCut <enum>level <index>index <point3>point <point3>normal node:<node>
       level enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
       node default value: undefined
    <void>WeldVertices <index>vertex1 <index>vertex2 node:<node>
       node default value: undefined
    <void>WeldEdges <index>edge1 <index>edge2 node:<node>
       node default value: undefined
    <void>BridgeBorders <index>edge1 <index>edge2 node:<node>
       node default value: undefined
    <void>BridgePolygons <index>poly1 <index>poly2 node:<node>
       node default value: undefined
    <void>BridgeEdges <index>edge1 <index>edge2 node:<node>
       node default value: undefined
    <node>GetBridgeNode()
    <void>SetBridgeNode <node>node
    <boolean>GetPreserveMap <integer>mapChannel
    <void>SetPreserveMap <integer>mapChannel <boolean>preserve
    <void>Attach <node>nodeToAttach editPolyNode:<node>
       editPolyNode default value: undefined
    <void>AttachList <node array>nodesToAttach editPolyNode:<node>
       editPolyNode default value: undefined
    <void>DetachToObject <&string>newObjectName
       newObjectName is In and Out parameter
    <void>CreateShape <&string>newShapeName
       newShapeName is In and Out parameter
    <integer>GetNumVertices node:<node>
       GetNumVertices - no automatic redraw after invoked
       node default value: undefined
    <point3>GetVertex <index>vertexID node:<node>
       GetVertex - no automatic redraw after invoked
       node default value: undefined
    <integer>GetVertexFaceCount <index>vertexID node:<node>
       GetVertexFaceCount - no automatic redraw after invoked
       node default value: undefined
    <index>GetVertexFace <index>vertexID <index>face node:<node>
       GetVertexFace - no automatic redraw after invoked
       node default value: undefined
    <integer>GetVertexEdgeCount <index>vertexID node:<node>
       GetVertexEdgeCount - no automatic redraw after invoked
       node default value: undefined
    <index>GetVertexEdge <index>vertexID <index>edge node:<node>
       GetVertexEdge - no automatic redraw after invoked
       node default value: undefined
    <integer>GetNumEdges node:<node>
       GetNumEdges - no automatic redraw after invoked
       node default value: undefined
    <index>GetEdgeVertex <index>edgeID <index>end node:<node>
       GetEdgeVertex - no automatic redraw after invoked
       node default value: undefined
    <index>GetEdgeFace <index>edgeID <index>side node:<node>
       GetEdgeFace - no automatic redraw after invoked
       node default value: undefined
    <integer>GetNumFaces node:<node>
       GetNumFaces - no automatic redraw after invoked
       node default value: undefined
    <integer>GetFaceDegree <index>faceID node:<node>
       GetFaceDegree - no automatic redraw after invoked
       node default value: undefined
    <index>GetFaceVertex <index>faceID <index>corner node:<node>
       GetFaceVertex - no automatic redraw after invoked
       node default value: undefined
    <index>GetFaceEdge <index>faceID <index>side node:<node>
       GetFaceEdge - no automatic redraw after invoked
       node default value: undefined
    <index>GetFaceMaterial <index>faceID node:<node>
       GetFaceMaterial - no automatic redraw after invoked
       node default value: undefined
    <integer>GetFaceSmoothingGroups <index>faceID node:<node>
       GetFaceSmoothingGroups - no automatic redraw after invoked
       node default value: undefined
    <integer>GetNumMapChannels node:<node>
       GetNumMapChannels - no automatic redraw after invoked
       node default value: undefined
    <boolean>GetMapChannelActive <integer>mapChannel node:<node>
       GetMapChannelActive - no automatic redraw after invoked
       node default value: undefined
    <integer>GetNumMapVertices <integer>mapChannel node:<node>
       GetNumMapVertices - no automatic redraw after invoked
       node default value: undefined
    <point3>GetMapVertex <integer>mapChannel <index>vertexID node:<node>
       GetMapVertex - no automatic redraw after invoked
       node default value: undefined
    <index>GetMapFaceVert <integer>mapChannel <index>faceID <index>corner node:<node>
       GetMapFaceVert - no automatic redraw after invoked
       node default value: undefined
    <void>List node:<node>
       List - no automatic redraw after invoked
       node default value: undefined
    <void>LocalDataChanged <integer>parts
    <void>RefreshScreen()
    <boolean>InSlice()
       InSlice - no automatic redraw after invoked
    <boolean>ShowOperationDialog()
       ShowOperationDialog - no automatic redraw after invoked
    <boolean>ShowingOperationDialog()
       ShowingOperationDialog - no automatic redraw after invoked
    <void>CloseOperationDialog()
       CloseOperationDialog - no automatic redraw after invoked
    <node>GetPrimaryNode()
       GetPrimaryNode - no automatic redraw after invoked
    <matrix3>GetNodeTM node:<node>
       GetNodeTM - no automatic redraw after invoked
       node default value: undefined
    <void>SetCutEnd <point3>endPoint node:<node>
       node default value: undefined
    <index>GetLastCutEnd()
       GetLastCutEnd - no automatic redraw after invoked
    <void>ClearLastCutEnd()
       ClearLastCutEnd - no automatic redraw after invoked
    <void>CutCancel node:<node>
       node default value: undefined
    <index>DivideEdge <index>edgeID <float>proportion node:<node>
       node default value: undefined
    <index>DivideFace <index>faceID <float array>vertexCoefficients node:<node>
       node default value: undefined
    <void>RingSelect <integer>RingValue <boolean>MoveOnly <boolean>Add
    <void>LoopSelect <integer>LoopValue <boolean>MoveOnly <boolean>Add
    <integer>ConvertSelectionToBorder <enum>fromLevel <enum>toLevel
       fromLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
       toLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    <void>CommitPaintDeform()
    <void>CancelPaintDeform()
    <point3>GetFaceNormal <index>faceID node:<node>
       GetFaceNormal - no automatic redraw after invoked
       node default value: undefined
    <point3>GetFaceCenter <index>faceID node:<node>
       GetFaceCenter - no automatic redraw after invoked
       node default value: undefined
    <float>GetFaceArea <index>faceID node:<node>
       GetFaceArea - no automatic redraw after invoked
       node default value: undefined
    <bitArray>GetOpenEdges node:<node>
       GetOpenEdges - no automatic redraw after invoked
       node default value: undefined
    <boolean>GetVerticesByFlag <&bitArray>vertexSet <integer>flagsRequested flagMask:<integer> node:<node>
       GetVerticesByFlag - no automatic redraw after invoked
       vertexSet is In and Out parameter
       flagMask default value: 0
       node default value: undefined
    <boolean>GetEdgesByFlag <&bitArray>edgeSet <integer>flagsRequested flagMask:<integer> node:<node>
       GetEdgesByFlag - no automatic redraw after invoked
       edgeSet is In and Out parameter
       flagMask default value: 0
       node default value: undefined
    <boolean>GetFacesByFlag <&bitArray>faceSet <integer>flagsRequested flagMask:<integer> node:<node>
       GetFacesByFlag - no automatic redraw after invoked
       faceSet is In and Out parameter
       flagMask default value: 0
       node default value: undefined
    <void>setVertexFlags <&bitArray>vertexSet <integer>flagsToSet flagMask:<integer> generateUndoRecord:<boolean> node:<node>
       vertexSet is In and Out parameter
       flagMask default value: 0
       generateUndoRecord default value: true
       node default value: undefined
    <void>setEdgeFlags <&bitArray>edgeSet <integer>flagsToSet flagMask:<integer> generateUndoRecord:<boolean> node:<node>
       edgeSet is In and Out parameter
       flagMask default value: 0
       generateUndoRecord default value: true
       node default value: undefined
    <void>setFaceFlags <&bitArray>faceSet <integer>flagsToSet flagMask:<integer> generateUndoRecord:<boolean> node:<node>
       faceSet is In and Out parameter
       flagMask default value: 0
       generateUndoRecord default value: true
       node default value: undefined
    <integer>getVertexFlags <index>vertexID node:<node>
       getVertexFlags - no automatic redraw after invoked
       node default value: undefined
    <integer>getEdgeFlags <index>edgeID node:<node>
       getEdgeFlags - no automatic redraw after invoked
       node default value: undefined
    <integer>getFaceFlags <index>faceID node:<node>
       getFaceFlags - no automatic redraw after invoked
       node default value: undefined
    <void>getVertsUsingEdge <&bitArray>vertSet <&bitArray>edgeSet node:<node>
       getVertsUsingEdge - no automatic redraw after invoked
       vertSet is In and Out parameter
       edgeSet is In and Out parameter
       node default value: undefined
    <void>getEdgesUsingVert <&bitArray>edgeSet <&bitArray>vertSet node:<node>
       getEdgesUsingVert - no automatic redraw after invoked
       edgeSet is In and Out parameter
       vertSet is In and Out parameter
       node default value: undefined
    <void>getFacesUsingEdge <&bitArray>faceSet <&bitArray>edgeSet node:<node>
       getFacesUsingEdge - no automatic redraw after invoked
       faceSet is In and Out parameter
       edgeSet is In and Out parameter
       node default value: undefined
    <void>getElementsUsingFace <&bitArray>elementSet <&bitArray>faceSet <&bitArray>fenceSet node:<node>
       getElementsUsingFace - no automatic redraw after invoked
       elementSet is In and Out parameter
       faceSet is In and Out parameter
       fenceSet is In and Out parameter
       node default value: undefined
    <void>getFacesUsingVert <&bitArray>faceSet <&bitArray>vertSet node:<node>
       getFacesUsingVert - no automatic redraw after invoked
       faceSet is In and Out parameter
       vertSet is In and Out parameter
       node default value: undefined
    <void>getVertsUsingFace <&bitArray>vertSet <&bitArray>faceSet node:<node>
       getVertsUsingFace - no automatic redraw after invoked
       vertSet is In and Out parameter
       faceSet is In and Out parameter
       node default value: undefined
    <void>setVert <&bitArray>vertSet <point3>point node:<node>
       vertSet is In and Out parameter
       node default value: undefined
    <boolean>SmGrpFloaterVisible()
    <void>SmGrpFloater()
    <boolean>MatIDFloaterVisible()
    <void>MatIDFloater()
    <void>ListDeltaOps()
   Actions:
OK
Share this Doc

Basics – Part 4

Or copy link

CONTENTS
Shopping Cart
×