MAXScript Language Reference > 3ds Max Objects > Editable Meshes, Splines, Patches, and Polys > Editable_Poly >

# Interface: EditablePoly

| Editable Poly - Quick Navigation

The EditablePoly Interface was added to the Editable_Poly class in 3ds Max 5.

Topic Navigation: |
--- | ---
Hide / Unhide Copy/Paste Named Selection Sets Create Delete Attach / Detach Break / Split / Divide Insert Vertex Collapse Extrude Faces Bevel Chamfer Bridge Relax Slice Cut Weld Create Shape From Edges Make Planar | Subdivide Triangulation Select Faces By UI Commands Get / Set By Flag Slice Plane Get Set Data Preview Mode Convert Selection Remove Connect Toggle Shaded Faces Get / Set Selections Get Vertex Get Edge Get Face Get Map Channel

## Editable_Poly interfaces:

    Interface: EditablePoly

Methods:

### Hide/Unhide

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.Hide <enum>mnSelLevel [flags:<DWORD>]

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Hide the sub-objects defined by flags in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.unhideAll <enum>mnSelLevel

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Unhide the specified sub-object level. The modify panel does not have to be in the same sub-object level for this method to have effect. Returns true on success.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to EPoly
    polyop.setFaceSelection p #{1,2} --select the first two polygons
    p.Hide #Face --hide the two polygons
    sleep 1 --wait a second
    p.UnHideAll #Face --unhide all hidden faces again

### Copy/Paste Named Selection Sets

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.EditablePoly.namedSelCopy <string>Name

Copy selection to the given name.

    <void><EditablePoly>.namedSelPaste <bool>useRenameDialog

Paste named selection. When useRenameDialog is supplied as true, enables the Rename Dialog.

### Create

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <index>createVertex <point3>point [pointInLocalCoords:<bool>] [select:<bool>]

    pointInLocalCoords default value: true
    select default value: false

Create a new vertex with the specified coordinates. If the optional pointInLocalCoords argument is true, the coordinates are taken in local space. If the optional select argument is true , the new vertex will be selected after creation. Returns the index of the new vertex.

    <index><EditablePoly>.createEdge <index>vertex1 <index>vertex2 [select:<bool>]

    select default value: false

Create a new edge between the two specified vertices. If the optional select argument is true , the new edge will be selected after creation. Returns the index of the new edge.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to EPoly
    p.createEdge 1 7 --create edge between vertices 1 and 7

    <index><EditablePoly>.createFace <index array>vertexArray [select:<bool>]

    select default value: false

Creates a new face using the specified array of vertices. If the optional select argument is true, the new face will be selected after creation. Returns the index of the new face.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to EPoly
    polyop.DeleteFaces p #(1) --delete the first polygon
    p.createFace #(1,6,5) --create a new polygon on its place

    <bool><EditablePoly>.capHoles <enum>mnSelLevel [flags:<DWORD>]

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Create new faces to cap open edge loops. Acquire open edge loop defining the hole using the msSelLevel enums. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to EPoly
    polyop.DeleteFaces p # (6) --delete a polygon
    --select all polygons surrounding the deleted one
    polyop.SetFaceSelection p #(1,2,3,5,6,8,9,10)
    select p --select the plane
    max modify mode --switch to Modify panel
    subObjectLevel = 4 --go to Face level to see the selection
    p.capHoles #Face --cap the hole using the selection

### Delete

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.delete <enum>mnSelLevel [flags:<DWORD>] [deleteIsoVerts:<bool>]

    mnSelLevelenums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

deleteIsoVerts default value: true

Delete the sub-objects in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.deleteIsoVerts()

Delete isolated vertices. Returns true on success.

    <bool><EditablePoly>.DeleteIsoMapVerts()

Delete the isolated vertices. Returns true on success.

### Attach/Detach

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.attach <node>nodeToAttach <node>myNode

Attach a node to the Editable_Poly object. The additional node provides the transformation of the node to be attached. You can use the nodeToAttach as myNode to use its own transforms.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to EPoly
    s = sphere radius:5 --create a sphere primitive
    p.attach s s --attach sphere to EPoly
    p = convertToPoly(Plane()) --create a plane, convert to EPoly
    b = Box() --create a box primitive
    b.rotation = eulerangles 45 45 0 --rotate the box
    t = teapot radius:5 --create a teapot primitive
    p.attach t b --attach teapot to EPoly using the box's transformation

    <bool><EditablePoly>.detachToElement <enum>mnSelLevel [flags:<DWORD>] [keepOriginal:<bool>]

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

keepOriginal default value: false

Detach the sub-objects defined by flags in the specified sub-object level to element. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to EPoly
    polyop.SetFaceSelection p #(6) --select polygon 6
    --Detach the selected polygon to element, keeping the original:
    p.detachToElement #Face keepOriginal:true

### Break/Split/Divide

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.breakVerts <DWORD>vertFlags

Break the vertices defined by edgeFlags . See polyOp.getEdgesByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.splitEdges edgeFlags:<DWORD>

    edgeFlags default value: 1

Split the edges defined by edgeFlags . See polyOp.getEdgesByFlag for descriptions of the flag bits.

    <index><EditablePoly>.divideEdge <index>edgeID <float>proportion [select:<bool>]

    select default value: false

Divides the specified edge using the proportions for placement control. Returns the index of the new vertex. If select is true, the new vertex will be selected.

    <index><EditablePoly>.divideFace <index>faceID <&float array>vertexCoefficients [select:<bool>]

    vertexCoefficients is In and Out parameter

select default value: false

Divides the specified polygon using the vertexCoefficients to place the new edges. Returns the index of the new vertex. If select is true , the new vertex will be selected.

### Insert Vertex

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <index><EditablePoly>.insertVertexInFace <index>faceID <&float array>vertexCoefficients [select:<bool>]

    vertexCoefficients is In and Out parameter

select default value: false

Insert a vertex inside the specified polygon. Returns the index of the new vertex.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    --Insert new vertex in the middle of polygon 6.
    --new_vert will contain the index of the newly created vertex:
    new_vert = p.insertVertexInFace 6 #(0.5,0.0,0.5)

    <index><EditablePoly>.insertVertexInEdge <index>edgeID <float>proportion [select:<bool>]

    select default value: false

Inserts a vertex in the specified edge using the proportions for placement control. Returns the index of the new vertex. If select is true, the new vertex will be selected.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    --Insert new vertex and split edge 17 at 1/3 of its edge.
    --new_vert will contain the index of the newly created vertex:
    new_vert = p.insertVertexInEdge 17 0.3
    polyOp.setVertSelection #{new_vert} --select the new vertex
    select p --select the plane
    maxmodify mode --switch to modify panel
    subObjectLevel = 1 --go to Vertex level and check it out

### Collapse

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.collapse <enum>mnSelLevel [flags:<DWORD>]

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Collapses the sub-objects defined by flags in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    polyop.setVertSelection p #{7,8,12,13} --select some vertices
    p.EditablePoly.collapse #Vertex --collapse the selected vertices

### Extrude Faces

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.extrudeFaces <float>amount [faceFlags:<DWORD>]

    faceFlags default value: 1

Extrudes the polygons defined by faceFlags by the specified amount.

By default uses flag 1 which means selected polygons.

See polyOp.getFacesByFlag for descriptions of the flag bits.

SAMPLE SCRIPT
    --create a skyscraper-like structure through random extrusions
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    for i = 1 to 50 do --repeat 50 times
    (
    polyop.setFaceSelection p #{(random 1 16)} --select a random polygon
    p.extrudeFaces 5.0 --extrude the selection
    )

    <bool><EditablePoly>.ExtrudeAlongSpline faceFlag:<DWORD>

    faceFlag default value: 1

Extrude along spline the polygons defined by the flags.

Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.HingeFromEdge faceFlag:<DWORD>

    faceFlag default value: 1

Hinge from edge the polygons defined by the flags.

Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

### Bevel

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.bevelFaces <float>height <float>outline [faceFlags:<DWORD>]

    faceFlags default value: 1

Bevels the polygons defined by faceFlags using the specified amount and outline values.

By default uses flag 1 which means selected polygons.

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    --create a futuristic skyline through random bevels
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    for i = 1 to 50 do --repeat 50 times
    (
    polyop.setFaceSelection p #{(random 1 16)} --select a random polygon
    p.bevelFaces 5.0 (random 0.0 -1.0) --randomly bevel the selection
    )

### Chamfer

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.chamferVertices <float>amount open:<bool>

    open default value: false

Chamfer the selected vertices using the specified amount.

If the optional open: keyword is supplied and set to true , the new faces generated by the chamfer operation will be removed, leaving an opening.

Available in 3ds Max 8 and higher.

EXAMPLE
    p = convertToPoly (Plane()) --create a plane, convert to Epoly
    polyop.setVertSelection p #{1,5,21,25} --select the corner vertices
    p.EditablePoly.chamferVertices 5.0 --chamfer the selection

    <void><EditablePoly>.chamferEdges <float>amount open:<bool>

    open default value: false

Chamfers the selected edges using the specified amount.

If the optional open: keyword is supplied and set to true , the new faces generated by the chamfer operation will be removed, leaving an opening.

Available in 3ds Max 8 and higher.

EXAMPLE
    p = convertToPoly (Plane()) --create a plane, convert to Epoly
    polyop.setEdgeSelection p #{7,10} --select two side edges
    p.EditablePoly.chamferEdges 5.0 --chamfer the selection

### Bridge

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.Bridgesel Level:<enum> flag:<DWORD>

    selLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    selLevel default value:#CurrentLevel
    flag default value: 1

Creates a bridge using the specified selection level and flags.

Returns true on success, false otherwise.

NoteThere are a number of Properties controlling the result of the Bridge method. See Editable Poly Properties - Bridge

EXAMPLE
    b = box() --create a box
    b.heightsegs = b.widthsegs = b.lengthsegs = 5 --set segments to 5
    convertToPoly(b) --convert to Editable Poly
    --select the central faces on both sides of the box:
    polyOp.setFaceSelection b #{57..59, 62..64, 67..69, 107..109, 112..114, 117..119}
    b.bridgeSegments = 5 --set the bridge segments property to 5
    b.bridge selLevel: #Face --bridge the selected polygons

    <bool><EditablePoly>.ReadyToBridgeFlagged selLevel:<enum> flag:<DWORD>

    selLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    selLevel default value:#CurrentLevel
    flag default value: 1

Returns true if the specified selection level and flags are ready to be bridged, false otherwise.

### Relax

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.Relax selLevel:<enum> flag:<DWORD>

    selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    selLevel default value:#CurrentLevel
    flag default value: 1

Relaxes the vertices using the specified selection level and flags.

Returns true on success, false otherwise.

NoteThere are a number of Properties controlling the result of the Relax method. See Editable Poly Properties - Relax fordetails.

EXAMPLE
    b = box() --create a box
    b.heightsegs = b.widthsegs = b.lengthsegs = 5 --set segments to 5
    convertToPoly(b) --convert to Editable Poly
    b.relaxAmount = 1.5 --set the relax amount property to 1.5
    b.relax selLevel:#Object --relax the whole mesh
    b2 = box() --create another box
    b2.heightsegs = b2.widthsegs = b2.lengthsegs = 5 --set segments to 5
    convertToPoly(b2) --convert to Editable Poly
    b2.relaxAmount = -1.5 --set the relax amount property to-1.5
    b2.pos = [40,0,0] --place the box 40 units from the first one
    b2.relax selLevel:#Object --relax the whole mesh

### Slice

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.slice <point3>slicePlaneNormal <point3>slicePlaneCenter [flaggedFacesOnly:<bool>] [faceFlags:<DWORD>]

    flaggedFacesOnly default value: false
    faceFlags default value: 1

Slices using a slice plane defined by the normal vector and center. Both values are specified in local coordinates.

When flaggedFacesOnly is set to true , only polygons specified by faceFlags will be affected (by default flag is 1, in other words, selected polygons). Operates by default on the whole EditablePoly object. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    --create a box, convert to Epoly
    p = convertToPoly(Box())
    --slice using a diagonal plane at height 10
    p.slice [0,1,1] [0,0,10]
    --select a side polygon
    polyop.setFaceSelection p #{3}
    --slice the selected polygon only using a horizontal plane at height 15
    p.slice [0,0,1] [0,0,15] flaggedFacesOnly:true

    <bool>inSlicePlaneMode ()

Returns true if the EditablePoly is in slice plane mode.

### Cut

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <index><EditablePoly>.cutVertices <index>startVertex <point3>endPosition <point3>viewDirection

Cut using a plane defined by the start vertex, the specified point and the view direction.

    <index><EditablePoly>.cutEdges <index>startEdge <float>startProportion <index>endEdge <float>endProportion <point3>viewDirection

Cut using a plane defined by the point specified by the two edges and proportions and the view direction.

    <index><EditablePoly>.cutFaces <index>startFace <point3>startPosition <point3>endPosition <point3>viewDirection

Cut using a plane defined by the point specified by the two face positions and the view direction.

### Weld

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.weldVerts <index>vertex1 <index>vertex2 <point3>destinationPoint

Weld the two specified vertices and move the resulting vertex to the specified position.

Returns true on success.

    <bool><EditablePoly>.weldEdges <index>edge1 <index>edge2

Weld the two specified edges.

Returns true on success.

    <bool><EditablePoly>.weldFlaggedVertices [vertexFlags:<DWORD>]

    vertexFlags default value: 1

Weld the vertices defined by the supplied flags.

Returns true on success.

See polyOp.getVertsByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.weldFlaggedEdges [edgeFlags:<DWORD>]

    edgeFlags default value: 1

Weld the edges defined by the supplied flags.

Returns true on success.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

### Create Shape from edges

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.createShape <string>shapeName <bool>curved <node>myNode edgeFlags:<DWORD>

    edgeFlags default value: 1

Create a shape from the edges defined by the supplied flags.

Returns true on success.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

### Make Planar

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.makePlanar <enum>mnSelLevel [flags:<DWORD>]

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    flags default value: 1

Make the sub-objects defined by flags in the specified sub-object level planar.

Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.moveToPlane <point3>planeNormal <float>planeOffset <enum>mnSelLevel flags:<DWORD>

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    flags default value: 1

Move the sub-objects defined by flags in the specified sub-object level to the specified plane. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    polyop.setVertSelection p #{7,8,12,13} --select some vertices
    p.movetoplane [0,0,1] 5.0 #Vertex --move 5.0 units along +Z

    <bool><EditablePoly>.alignToGrid <enum>mnSelLevel [flags:<DWORD>]

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    flags default value: 1

Align the sub-objects defined by flags in the specified sub-object level to the active grid. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Box()) --create a Box, convert to Epoly
    polyop.setVertSelection p #{5,6} --select two top vertices
    select p --select the EPoly
    p.AlignToGrid #Vertex --align vertices to current grid

    <bool><EditablePoly>.alignToView <enum>mnSelLevel [flags:<DWORD>]

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    flags default value: 1

Align the sub-objects defined by flags in the specified sub-object level to the active view. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    polyop.setVertSelection p #{7,8,12,13} --select some vertices
    p.EditablePoly.alignToView #Vertex --align to current view

    <bool><EditablePoly>.MakePlanarIn <enum>axis selLevel:<enum> flag:<DWORD>

    axis enums: {#X|#Y|#Z}
    selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    selLevel default value:#CurrentLevel
    flag default value: 1

Makes the elements in the given sub-level specified by the flag bits planar relatively to the specified axis.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

### Subdivide

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.meshSmooth <enum>mnSelLevel flags:<DWORD>

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    flags default value: 1

Apply MeshSmooth the sub-objects defined by flags in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Box()) --create a Box, convert to Epoly
    polyop.setVertSelection p #{1} --select a vertex
    --apply meshSmooth 3 times to the selected vertex:
    for i = 1 to 3 do p.meshSmooth #Vertex

    <bool><EditablePoly>.tessellate <enum>mnSelLevelflags:<DWORD>

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    flags default value: 1

Tessellate the sub-objects defined by flags in the specified sub-object level.

Returns true on success.

EXAMPLE
    p = convertToPoly(Box()) --create a Box, convert to Epoly
    polyop.setVertSelection p #{1} --select a vertex
    --apply tessellate 3 times to the selected vertex:
    for i = 1 to 3 do p.tessellate #Vertex

    <void><EditablePoly>.forceSubdivision()

Force subdivision.

### Triangulation

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.setDiagonal <index>face <index>corner1 <index>corner2

Set a diagonal in the specided face from corner1 to corner2.

    <bool><EditablePoly>.retriangulate <DWORD>faceFlags

Retriangulate the faces defined by faceFlags .

Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.TurnDiagonal <index>face <index>diagonal

Turn the indexed diagonal of the indexed face.

    <bool><EditablePoly>.flipNormals <DWORD>faceFlags

Flip the normals of the faces defined by faceFlags .

Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

### Select Faces By...

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.selectByMaterial <index>materialID [clearCurrentSelection:<bool>]

    clearCurrentSelection default value: true

Select the faces with the specified materialID.

If the optional clearCurrentSelection is set to false , the existing selection will be kept.

    <void><EditablePoly>.selectBySmoothGroup <DWORD>smoothingGroups [clearCurrentSelection:<bool>]

    clearCurrentSelection default value: true

Select the faces with the specified smoothing groups.

If the optional clearCurrentSelection is set to false , the existing selection will be kept.

    <void><EditablePoly>.autosmooth()

Generate smoothing groups automatically based on face angles.

### UI Commands

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.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 }

Presses the specified Editable_Poly UI button.

EXAMPLE
    p = convertToPoly(Plane()) --create a Box, convert to Epoly
    polyop.setFaceSelection p #{6} --select a single polygon
    select p --select the object
    max modify mode --go to modify panel
    subobjectlevel = 4 --go to polygon sub-object level
    p.ButtonOp #GrowSelection --grow the selection

    <void><EditablePoly>.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}

Presses the specified Editable_Poly UI button to enter a command mode.

    <void><EditablePoly>.enterPickMode <enum>pickModeID

    pickModeID enums: {#Attach|#PickShape}

Presses the button to enter the specified pick mode.

    <void><EditablePoly>.exitCommandModes ()

Exits any active command mode.

### Get/Set By Flag

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.getVerticesByFlag <&bitArray>vertexSet <DWORD>flagsRequested [flagMask:<DWORD>]

    vertexSet is In and Out parameter
    flagMask default value: 0

Returns true on success.

Each vertex in a poly contains a 32 bit flag variable.

This method returns a by-reference bitarray of the vertices that have specific bits in this flag variable set, where the bits being tested are based on a combination of < flagsRequested > and < flagMask >.

Internally, if < flagMask > is 0 then < flagMask > is set to the < flagsRequested > value, otherwise < flagsRequested > is set to the bitwise-AND of < flagsRequested > and < flagMask >.

Bit 2 of < flagMask > is then set, which prevents dead vertices from being included in the resulting bitarray unless this bit was set in < flagMask >.

Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and < flagMask > is equal to the bitwise-AND of < flagsRequested > and < flagMask >.

See polyOp.getVertsByFlag for descriptions of the flag bits.

EXAMPLE
    my_array= #{} --define an empty bitarray
    b = bit.Set 0 1 true --set the first bit to true
    --now call the function and supply the empty array as
    --In parameter by reference and the flag bit to filter out
    $.getVerticesByFlag&my_array b
    --Now look at the content of the bitarray -
    --it will contain the vertices that have their first flag bit set
    --(bit 1 stands for selected, so it will contain the vertex selection)
    print my_array

    <bool><EditablePoly>.getEdgesByFlag <&bitArray>edgeSet <DWORD>flagsRequested [flagMask:<DWORD>]

    edgeSet is In and Out parameter
    flagMask default value: 0

Get all edges whose flag bits are set to the ones supplied by flagsRequested . Returns true on success.

Each edge contains a 32 bit flag variable. This method returns a by-reference bitarray of the edges that have specific bits in this flag variable set, where the bits being tested are based on a combination of < flagsRequested > and < flagMask >.

Internally, if < flagMask > is 0 then < flagMask > is set to the < flagsRequested > value, otherwise < flagsRequested > is set to the bitwise-AND of < flagsRequested > and < flagMask >.

Bit 2 of < flagMask > is then set, which prevents dead edges from being included in the resulting bitarray unless this bit was set in < flagMask >.

Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and < flagMask > is equal to the bitwise-AND of < flagsRequested > and < flagMask >.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

EXAMPLE
    my_array= #{} --define an empty bitarray
    b = bit.Set 0 1 true --set the first bit to true
    --now call the function and supply the empty array as
    --In parameter by reference and the flag bit to filter out
    $.getEdgesByFlag&my_array b
    --Now look at the content of the bitarray:
    --it will contain the edges that have their first flag bit set
    --(bit 1 stands for selected, so it will contain the edge selection)
    print my_array

    <bool><EditablePoly>.getFacesByFlag <&bitArray>faceSet <DWORD>flagsRequested [flagMask:<DWORD>]

    faceSet is In and Out parameter
    flagMask default value: 0

Returns true on success.

Each face contains a 32 bit flag variable.

This method returns a by-reference bitarray of the faces that have specific bits in this flag variable set, where the bits being tested are based on a combination of < flagsRequested > and < flagMask >.

Internally, if < flagMask > is 0 then < flagMask > is set to the < flagsRequested > value, otherwise < flagsRequested > is set to the bitwise-AND of < flagsRequested > and < flagMask >.

Bit 2 of < flagMask > is then set, which prevents dead faces from being included in the resulting bitarray unless this bit was set in < flagMask >.

Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and < flagMask > is equal to the bitwise-AND of < flagsRequested > and < flagMask >.

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    my_array= #{} --define an empty bitarray
    b = bit.Set 0 1 true --set the first bit to true
    --now call the function and supply the empty array as
    --In parameter by reference and the flag bit to filter out
    $.getFacesByFlag&my_array b
    --Now look at the content of the bitarray:
    --it will contain the faces that have their first flag bit set
    --(bit 1 stands for selected, so it will contain the face selection)
    print my_array

    <void><EditablePoly>.setVertexFlags <&bitArray>vertexSet <DWORD>flagsToSet [flagMask:<DWORD>] generateUndoRecord:<bool>

    vertexSet is In and Out parameter
    flagMask default value: 0

Set the flag bits of the vertices supplied by the vertexSet bitarray to the bits supplied by flagsToSet .

See polyOp.getVertsByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    my_array= #{1,2,3,4} --define an bitarray with some bits set
    b = bit.Set 0 1 true --set the first bit to true
    --now call the function and supply the array as
    --In parameter by reference and the flag bit to get
    p.setVertexFlags&my_array b
    --Since flag bit 1 stands for selected, the above will basically select
    --the first 4 vertices in the EditablePoly by setting the
    --corresponding flag bits. So let's take a look:
    select p --select the plane
    max modify mode --go to modify panel
    subObjectLevel = 1 --set sub-object level to vertex -
    --the first 4 vertices should be selected

    <void><EditablePoly>.setEdgeFlags <&bitArray>edgeSet <DWORD>flagsToSet [flagMask:<DWORD>] generateUndoRecord:<bool>

    edgeSet is In and Out parameter
    flagMask default value: 0

Set the flag bits of the edges supplied by the edgeSet bitarray to the bits supplied by flagsToSet .

See polyOp.getEdgesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    my_array= #{1,2,3,4} --define an bitarray with some bits set
    b = bit.Set 0 1 true --set the first bit to true
    --now call the function and supply the array as
    --In parameter by reference and the flag bit to get
    p.setEdgeFlags&my_array b
    --Since flag bit 1 stands for selected, the above will basically select
    --the first 4 vertices in the EditablePoly by setting the
    --corresponding flag bits. So let's take a look:
    select p --select the plane
    max modify mode --go to modify panel
    subObjectLevel = 2 --set sub-object level to edge -
    --the first 4 edges should be selected

    <void><EditablePoly>.setFaceFlags <&bitArray>faceSet <DWORD>flagsToSet [flagMask:<DWORD>] generateUndoRecord:<bool>

    faceSet is In and Out parameter
    flagMask default value: 0

Set the flag bits of the faces supplied by the faceSet bitarray to the bits supplied by flagsToSet .

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a plane, convert to Epoly
    my_array= #{1,2,3,4} --define an bitarray with some bits set
    b = bit.Set 0 1 true --set the first bit to true
    --now call the function and supply the array as
    --In parameter by reference and the flag bit to get
    p.setFaceFlags&my_array b
    --Since flag bit 1 stands for selected, the above will basically select
    --the first 4 vertices in the EditablePoly by setting the
    --corresponding flag bits. So let's take a look:
    select p --select the plane
    max modify mode --go to modify panel
    subObjectLevel = 4 --set sub-object level to face -
    --the first 4 faces should be selected

### Slice Plane

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.resetSlicePlane ()

Reset the slice plane transformations to their defaults.

    <void><EditablePoly>.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

Get the orientation, center and size of the slice plane.

EXAMPLE
    --Define variables to hold the Out parameters:
    plane_normal = Point3 0 0 0
    plane_center = Point3 0 0 0
    plane_size = 1.0
    --Call the function and supply the variables by reference as In parameters
    $.getSlicePlane &plane_normal &plane_center &plane_size
    --The variables will now contain the actual values of the slice plane:
    plane_normal
    plane_center
    plane_size

    <void><EditablePoly>.setSlicePlane <&point3>planeNormal <&point3>planeCenter <float>planeSize

    planeNormal is In and Out parameter
    planeCenter is In and Out parameter

Set the orientation, center and size of the slice plane.

EXAMPLE
    --Define variables to hold the In parameters:
    plane_normal = Point3 0 1 0
    plane_center = Point3 5 5 6
    --Call the function and supply the variables by reference as In parameters
    $.setSlicePlane &plane_normal &plane_center 20.0
    --The slice plane transforms should have changed

### Get/Set Data

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <float><EditablePoly>.getVertexData <integer>vertexDataChannel <*integer>numberSelected <*bool>uniformData [vertexFlags:<DWORD>]

    numberSelected is In and Out parameter
    uniformData is In and Out parameter
    vertexFlags default value: 1

Get the vertex data stored in the specified vertexDataChannel .

The number of vertices with stored values in this channel will be written to the passed by reference variable numberSelected .

If all vertices contain the same value, the passed by reference boolean variable uniformData will contain true , otherwise false .

If vertexFlags is specified, only values from the flagged vertices will be read.

Returns the value stored in the first vertex encountered (e.g. the vertex with lower index)

See polyOp.getVertsByFlag for descriptions of the flag bits.

    <float><EditablePoly>.getEdgeData <integer>edgeDataChannel <*integer>numberSelected <*bool>uniformData [edgeFlags:<DWORD>]

    numberSelected is In and Out parameter
    uniformData is In and Out parameter
    edgeFlags default value: 1

Get the edge data stored in the specified edgeDataChannel .

The number of edges with stored values in this channel will be written to the passed by reference variable numberSelected .

If all edges contain the same value, the passed by reference boolean variable uniformData will contain true , otherwise false .

If edgeFlags is specified, only values from the flagged edges will be read.

Returns the value of the first edge encountered (e.g. the edge with lower index)

See polyOp.getEdgesByFlag for descriptions of the flag bits.

    <void><EditablePoly>.setVertexData <integer>vertexDataChannel <float>value vertexFlags:<DWORD>

    vertexFlags default value: 1

Set the vertex data stored in the specified vertexDataChannel to the provided value. If vertexFlags is specified, only flagged vertices will be affected.

See polyOp.getVertsByFlag for descriptions of the flag bits.

    <void><EditablePoly>.setEdgeData <integer>edgeDataChannel <float>value [edgeFlags:<DWORD>]

    edgeFlags default value: 1

Set the edge data stored in the specified edgeDataChannel to the provided value. If edgeFlags is specified, only flagged edges will be affected.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane())
    -->$Editable_Poly:Plane01 @ [0.000000,0.000000,0.000000]
    polyop.setVertSelection p #{1,2} --select vertices 1 and 2
    -->OK
    numsel = 1 --define a variable to pass by reference
    -->1 --it will contain the number of vertices
    uniform = false --define a boolean var. for uniformity
    -->false --will be true when values are uniform
    p.getVertexData 1 &numsel &uniform --check default values
    -->1.0 --default value returned is 1.0
    numsel--look at the selection number again
    -->2 --two vertices were encountered
    uniform --check the uniformity
    -->true --both vertices had the same value
    p.setVertexData 1 100.0 --now change values to 100.0
    -->OK
    p.getVertexData 1 &numsel &uniform --and read it back
    -->100.0 --the value has changed!
    numsel --look at the selection number again
    -->2 --still two vertices encountered
    uniform --check the uniformity
    -->true --both vertices still have the same value
    polyop.setVertSelection p #{3} --select vertex 3 alone
    -->OK
    p.setVertexData 1 200.0 --change value to 200.0
    -->OK
    p.getVertexData 1 &numsel &uniform --get the value
    -->200.0 --it is 200.0 as desired
    polyop.setVertSelection p #{1,2,3} --select all 3 vertices
    -->OK
    p.getVertexData 1 &numsel &uniform --get all 3 values
    -->100.0 --result is 100.0 because vert.1 is the first encountered
    numsel --check how many vertices have been selected
    -->3 --we selected 3 and there were actually 3
    uniform --were the values uniform?
    -->false --we have two 100.0 and one 200.0 value, not uniform

    <void><EditablePoly>.resetVertexData <integer>vertexDataChannel

Reset the vertex data stored in the specified vertexDataChannel .

    <void><EditablePoly>.resetEdgeData <integer>edgeDataChannel

Reset the vertex data stored in the specified edgeDataChannel .

    <void><EditablePoly>.beginModifyPerData <enum>mnSelLevel <integer>dataChannel

    mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Puts the EditablePoly object into ModifyPerData state.

This makes all changes to the specified sub-object level and dataChannel conditional.

At the end of the data changes, endModifyPerData has to be called with a boolean parameter to commit or discard the changes.

    <bool><EditablePoly>.inModifyPerData ()

Returns true if the object is currently in ModfyPerData state.

    <void><EditablePoly>.endModifyPerData <bool>success

Exits the ModifyPerData state.

If true is supplied for success, the changes will be commited.

If false is supplied for success, the changes will be discarded.

See also beginModifyPerData .

EXAMPLE
    p = convertToPoly(Plane())
    -->$Editable_Poly:Plane01 @ [0.000000,0.000000,0.000000]
    polyop.setVertSelection p #{1,2} --select vertices 1 and 2
    -->OK
    numsel = 1 --define a variable to pass by reference
    -->1 --it will contain the number of vertices
    uniform = false --define a boolean var. for uniformity
    -->false --will be true when values are uniform
    p.getVertexData 1 &numsel &uniform --check default values
    -->1.0 --default value returned is 1.0
    p.beginModifyPerData #vertex 1 --begin Modify Data state
    -->OK
    p.setVertexData 1 100.0 --change values to 100.0
    -->OK
    p.endModifyPerData false --end Modify state, say it failed
    -->OK
    p.getVertexData 1 &numsel &uniform --check the value
    -->1.0 --the value has NOT changed!
    p.beginModifyPerData #vertex 1 --again Modify Data state
    -->OK
    p.setVertexData 1 100.0 --change values to 100.0
    -->OK
    p.endModifyPerData true --end Modify state with success!
    -->OK
    p.getVertexData 1 &numsel &uniform --check the value
    -->100.0 --the value has changed as we notified success!

    <index><EditablePoly>.getMaterialIndex <*bool>determined

    determined is In and Out parameter

Returns the material ID.

    <void><EditablePoly>.setMaterialIndex <index>index <DWORD>faceFlags

Set the material ID of the faces specified by the supplied flags.

    <void><EditablePoly>.getSmoothingGroups <DWORD>faceFlag <*DWORD>anyFaces <*DWORD>allFaces

    anyFaces is In and Out parameter
    allFaces is In and Out parameter

Get the smoothing groups of the specified faces.

    <void><EditablePoly>.setSmoothingGroups <DWORD>bitValues <DWORD>bitMask <DWORD>faceFlags

Set the smoothing groups of the specified faces.

    <void><EditablePoly>.collapseDeadStructures()

Collapses all dead structures.

    <integer><EditablePoly>.propogateComponentFlags <enum>mnSelLevelTo <DWORD>flagSetTo <enum>mnSelLevelFrom <DWORD>flagTestFrom \
    [allBitsMustMatch:<bool>] [set:<bool>] [undoable:<bool>]

    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

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

### Preview Mode

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.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}

Preview the specified operation. Lets you create interactive dialogs for manipulating sub-object selections in realtime.

EXAMPLE
    --The following script creates a plane and a small menu to interactively
    --extrude selected polygons.
    p = convertToPoly(Plane()) --create a plane, turn to Epoly.
    select p --select the plane
    max modify mode --enter Modify panel
    subobjectlevel = 4 --set Sub-Object mode to Polygon
    rollout extrude_faces"Extrude" --define a rollout
    (
    button try_it"Preview"across:3 --a button to start a new extrusion
    button cancel_it"Cancel" --a button to cancel preview
    button accept_it"Accept" --a button to accept the extrusion
    on cancel_it pressed do p.previewCancel() --cancel
    on accept_it pressed do p.previewAccept() --accept
    on try_it pressed do p.previewBegin #Extrude --begin again
    )
    createDialog extrude_faces 200 30 --create a dialog with the rollout
    --Run the script, select some polygons, press Preview
    --and watch them extrude interactively.
    --Press Accept if you like the result, press Cancel to discard.
    --Press Preview again for next extrusion etc.

    <void><EditablePoly>.PreviewCancel ()

Cancel the interactive preview.

    <void><EditablePoly>.PreviewAccept ()

Accept the interactive preview results.

    <void><EditablePoly>.PreviewInvalidate ()

Invalidates the preview results.

    <bool><EditablePoly>.PreviewOn ()

Enables preview mode.

    <void><EditablePoly>.PreviewSetDragging <bool>dragging

Enables/Disables preview dragging.

    <bool><EditablePoly>.PreviewGetDragging ()

Returns true if preview dragging is enabled, false otherwise.

    <bool><EditablePoly>.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}

Push the popup dialog's button for the specified interactive operation.

    <void><EditablePoly>.ClosePopupDialog ()

Close the popup dialog

### Repeat Last Operation

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.RepeatLastOperation ()

Repeat the last operation in the current sub-object level.

### Convert Selection

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.GrowSelection selLevel:<enum>

    selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    selLevel default value: #CurrentLevel

Grow the selection in the specified sub-object level.

    <void><EditablePoly>.ShrinkSelection selLevel:<enum>

    selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    selLevel default value: #CurrentLevel

Shrink the selection in the specified sub-object level.

    <integer><EditablePoly>.ConvertSelection <enum>fromSelLevel <enum>toSelLevel [requireAll:<bool>]

    fromSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    toSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    requireAll default value: false

Convert the selection from the specified source sub-object level to the specified target sub-object level. Returns the number of selected target sub-object elements.

    <void><EditablePoly>.SelectBorder ()

Select the borders containing the currently selected edges.

    <void><EditablePoly>.SelectElement ()

Select the elements containing the currently selected faces.

    <void><EditablePoly>.SelectEdgeLoop ()

Select the edge loops containing the currently selected edges.

    <void><EditablePoly>.SelectEdgeRing ()

Select the edge rings using the currently selected edges.

    <void><EditablePoly>.setRingShift <integer>RingShiftValue <bool>MoveOnly <bool>Add

Moves the Ring selection.

Available in 3ds Max 8 and higher.

RingShiftValue is the quantity of edges to shift.

If MoveOnly is true, the selected edges will be moved, If Add is true and MoveOnly is true, newly selected edges will be added to the current selection.

If MoveOnly is true and Add is false, newly selected edges will be removed to the current selection.

    <void><EditablePoly>.setLoopShift <integer>LoopShiftValue <bool>MoveOnly <bool>Add

Moves the Loop selection.

Available in 3ds Max 8 and higher.

LoopShiftValue is the quantity of edges to shift.

If MoveOnly is true, the selected edges will be moved, If Add is true and MoveOnly is true, newly selected edges will be added to the current selection.

If MoveOnly is true and Add is false, newly selected edges will be removed to the current selection.

    <integer><EditablePoly>.ConvertSelectionToBorder <enum>fromSelLevel <enum>toSelLevel

    fromSelLevel enums:{#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}
    toSelLevel enums:{#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

Converts the current selection to border selection. The first argument represent the sub-object type to convert from, the second one represents the sub-object type to convert to. Available in 3ds Max 8 and higher.

### Remove

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.Remove selLevel:<enum> flag:<DWORD>

    selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}
    selLevel default value: #CurrentLevel
    flag default value: 1

Remove the sub-objects defined by flags from the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag, polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    polyop.setVertSelection p #{13} --select a vertex
    p.EditablePoly.Remove selLevel:#Vertex
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    polyop.setVertSelection p #{13} --select a vertex
    select p --select object
    subobjectlevel = 1 --change to vertex level
    p.Remove() --remove the current selection

### Outline

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.Outline [faceFlag:<DWORD>]

    faceFlag default value: 1

Outline the polygons defined by the flags. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

### Connect

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <bool><EditablePoly>.ConnectEdges edgeFlag:<DWORD>

    edgeFlag default value: 1

Connect the edges defined by the flags. Returns true on success.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

    <bool><EditablePoly>.ConnectVertices vertexFlag:<DWORD>

    vertexFlag default value: 1

Connect the vertices defined by the flags. Returns true on success.

See polyOp.getVertsByFlag for descriptions of the flag bits.

### Toggle Shaded Faces

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.ToggleShadedFaces ()

Toggles shaded polygons.

### Get/Set Selections

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <enum><EditablePoly>.GetEPolySelLevel ()

    GetEPolySelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

Returns the EditablePoly selection level set in the Modify panel.

    <enum><EditablePoly>.GetMeshSelLevel ()

    GetMeshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Returns the mesh selection level, this means the sub-object that can be selected in the current sub-object level.

Edge and Border sub-object levels both return #Edge, Polygon and Element sub-object levels both return #Face.

    <bitArray><EditablePoly>.GetSelection <enum>selectionLevel

    selectionLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Returns the selection from the specified sub-object level as bitarray

    <void><EditablePoly>.SetSelection <enum>selectionLevel <bitArray>selection

    selectionLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Set the selection in the specified sub-object level using a bitarray.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    p.SetSelection #Face #{1,2,3} --select polygons 1,2 and 3
    p.SetSelection #Vertex #{1,2,3} --select vertices 1,2 and 3

### Get Vertex

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <integer><EditablePoly>.GetNumVertices ()

Returns the number of vertices in the EditablePoly.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    num_vert = p.GetNumVertices() --num_vert will contain 25

    <point3><EditablePoly>.GetVertex <index>vertexID

Returns the coordinates of the vertex with the specified index.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    --loop through all vertices in the plane and print
    --the coordinates of each one of them:
    for i = 1 to p.GetNumVertices() do
    print (p.GetVertex i)

    <integer><EditablePoly>.GetVertexFaceCount <index>vertexID

Returns the coordinates of the vertex with the specified index.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    --loop through all vertices in the plane and print the number
    --of polygons that are using each of them:
    for i = 1 to p.GetNumVertices() do
    print (p.GetVertexFaceCount i)

    <index><EditablePoly>.GetVertexFace <index>vertexID <index>face

Returns the face index of the Nth polygon sharing the specified vertex (where N is between 1 and the number of polygons using the vertex).

If the face argument is higher than the number of polygon sharing the vertex, the function will return 0.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    --Print the indices of all faces sharing vertex 13 in the plane.
    for i = 1 to (p.EditablePoly.GetVertexFaceCount 13) do
    print (p.EditablePoly.GetVertexFace 13 i)

    <integer><EditablePoly>.GetVertexEdgeCount <index>vertexID

Returns the number of edges sharing the specified vertex.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    p.GetVertexEdgeCount 1 --returns 2 for a corner vertex
    p.GetVertexEdgeCount 2 --returns 3 for a side vertex
    p.GetVertexEdgeCount 13 --returns 4 for an inside vertex

    <index><EditablePoly>.GetVertexEdge <index>vertexID <index>edge

Returns the edge index of the Nth edge sharing the specified vertex. (where N is between 1 and the number of edges sharing the vertex).

If the edge argument is higher than the number of edges sharing the vertex, the function will return 0.

EXAMPLE:
    p = convertToPoly(Plane())--create a Plane, convert to Epoly
    --Print the indices of all edges sharing vertex 13 in the plane.
    for i = 1 to (p.GetVertexEdgeCount 13) do
    print (p.GetEdgeFace 13 i)

### Get Edge

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <integer><EditablePoly>.GetNumEdges ()

Returns the number of edges in the EditablePoly.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    num_edges = p.GetNumEdges() --num_edges will contain 40

    <index><EditablePoly>.GetEdgeVertex <index>edgeID <index>end

Returns the vertex index used by the specified edge.

Since an edge has two vertices, the end argument is needed to define which of the two vertices of the edge to get.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    p.GetEdgeVertex 1 1 --returns vertex 6
    p.GetEdgeVertex 1 2 --returns vertex 1
    p.GetEdgeVertex 4 1 --returns vertex 1
    p.GetEdgeVertex 4 2 --returns vertex 2

    <index><EditablePoly>.GetEdgeFace <index>edgeID <index>side

Returns the face index used by the specified edge. Since an edge can have two faces, the side argument is needed to define which of the two possible faces to get.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    p.GetEdgeFace 18 1 --returns face 6
    p.GetEdgeFace 18 2 --returns face 7
    p.GetEdgeFace 4 1 --returns face 1
    p.GetEdgeFace 4 2 --returns 0 as there is no second face

### Get Face

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <integer><EditablePoly>.GetNumFaces ()

Returns the number of faces in the EditablePoly.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    num_faces = p.GetNumFaces() --num_faces will contain 16

    <integer><EditablePoly>.GetFaceDegree <index>faceID

Returns the number of corners of the specified polygon. 3 means triangle, 4 means quad etc.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    p.setSelection #Vertex #{13} --select the middle vertex
    p.GetFaceDegree 1 -- degree of the corner face is 4
    p.Remove selLevel:#Vertex --remove the middle vertex
    p.GetFaceDegree 6 -- degree of the middle face is 8

    <index><EditablePoly>.GetFaceVertex <index>faceID <index>corner

Returns the vertex index of the Nth vertex used by the specified face. (where N is between 1 and the number of face corners).

If the corner argument is higher than the number of face corners, the function will return 0.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    p.GetFaceVertex1 1 --returns face 6
    p.GetFaceVertex1 2 --returns face 1
    p.GetFaceVertex13 --returns face 2
    p.GetFaceVertex14 --returns face 7
    p.GetFaceVertex15 --returns 0, there is no fifth corner

    <index><EditablePoly>.GetFaceEdge <index>faceID <index>side

Returns the vertex index of the Nth vertex used by the specified face. (where N is between 1 and the number of face corners).

If the corner argument is higher than the number of face corners, the function will return 0.

EXAMPLE:
    p = convertToPoly(Plane()) --create a Plane, convert to Epoly
    p.GetFaceEdge1 1 --returns edge 1
    p.GetFaceEdge1 2 --returns edge 4
    p.GetFaceEdge13 --returns edge 3
    p.GetFaceEdge14 --returns edge 2
    p.GetFaceEdge15 --returns 0, there is no fifth edge

    <index><EditablePoly>.GetFaceMaterial <index>faceID

Returns the material ID of the specified face.

If the face index is higher than the number of faces in the EditablePoly, the function will return 1.

    <DWORD><EditablePoly>.GetFaceSmoothingGroups <index>faceID

Returns the Smoothing Groups of the specified face.

If the face index is higher than the number of faces in the EditablePoly, the function will return 0.

### Get Map Channel

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <integer><EditablePoly>.GetNumMapChannels ()

Returns the number of mapping channels in the EditablePoly.

    <bool><EditablePoly>.GetMapChannelActive <integer>mapChannel

Returns true if the specified mapping channel is active, false if not.

If the mapChannel argument is higher than the number of available mapping channels, the function will return false.

    <integer><EditablePoly>.GetNumMapVertices <integer>mapChannel

Returns the number of texture vertices in the specified mapping channel.

Returns 0 if the mapChannel argument is higher than the number of available mapping channels.

    <point3><EditablePoly>.GetMapVertex <integer>mapChannel <index>vertexID

Returns the value of the specified texture verticex in the specified mapping channel.

Returns [0,0,0] if the mapChannel argument is higher than the number of available mapping channels or the vertex index is higher than the number of texture vertices.

    <integer><EditablePoly>.GetMapFaceVertex <integer>mapChannel <index>faceID <index>corner

Returns the texture vertex index of the Nth texture vertex used by the specified face. (where N is between 1 and the number of face corners). If the corner argument is higher than the number of face corners, the function will return -1.

### Get/Set Vertex Color, Illumination and Alpha

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.SetVertexColor <color>color <enum>Channel

    Channel enums: {#VertexColor|#Illumination|#Alpha}

Sets the Vertex Color, Illumination or Alpha value of the selected vertices to the specified color value.

Corresponds to using the color picker in the Edit Vertex Colors rollout of the Editable Poly UI.

Available in 3ds Max 2010 and higher.

    <void><EditablePoly>.SetFaceColor <color>color <enum>Channel

    Channel enums: {#VertexColor|#Illumination|#Alpha}

Sets the Vertex Color, Illumination or Alpha value of the selected polygons to the specified color value.

This affects all vertices used by the selected polygons.

Corresponds to using the color picker in the Edit Vertex Colors rollout of the Editable Poly UI.

Available in 3ds Max 2010 and higher.

    <color by value><EditablePoly>.GetVertexColor <enum>Channel

    Channel enums: {#VertexColor|#Illumination|#Alpha}

Gets the Vertex Color, Illumination or Alpha value of the selected vertices

Available in 3ds Max 2010 and higher.

    <color by value><EditablePoly>.GetFaceColor <enum>Channel

    Channel enums: {#VertexColor|#Illumination|#Alpha}

Gets the Vertex Color, Illumination or Alpha value of the selected polygons

Available in 3ds Max 2010 and higher.

### Paint Deform

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

    <void><EditablePoly>.CommitPaintDeform ()

Commits the painted deformations and resets the deformation cache.

Corresponds to pressing the Commit button in the UI.

Available in 3ds Max 2010 and higher.

    <void><EditablePoly>.CancelPaintDeform ()

Cancels the painted deformations and resets the deformation cache.

Available in 3ds Max 2010 and higher.

| Back To Topic Navigation |  | Editable Poly - Quick Navigation

#### See Also

- Editable_Poly Properties

- Editable_Poly Methods

- Editable_Poly Geometry Methods (polyOp struct)

- Editable_Poly Mapping Methods(polyOp struct)