PolyToolsSelect : GlobalUtilityPlugin

 

   

Graphite Modeling Tools - Quick Navigation

The PolyToolsSelect Global Utility Plugin introduced in 3ds Max 2011 exposes an interface that provides MAXScript access to the Graphite Selection tools.

The functionality was first implemented in 3ds Max 2010 using different functions that were not officially supported as MAXScript tools. This interface consolidates all relevant properties and methods in one place and let MAXScript users apply them in their own tools.

Topic Navigation:  

Modify Selection

Select

Selection - By Random

Selection - By Symmetry

Selection - By Numeric

Selection - By Half

Selection - By Normal

Selection - By Perspective

Selection - Grow From Perspective View

Selection - By Pivot Distance

Selection - By Surface

Selection - Patterns

Selection - By Bitmap

   

Constructor:

Class instances not creatable by MAXScript

   

PolyToolsSelect interfaces:

Interface: PolyToolsSelect 

Methods:

Modify Selection

<bool>PolyToolsSelect.Loop <bool>cylinderEnds 	 

Selects a loop based on current sub-object selection:

Sub-Object Level

ShiftPressed = False

ShiftPressed = True

Polygon

Select sets of neighboring polygons and apply to select loops.

 

Edge

Select edges and apply to select loops.

The tool will also be able to perform loops on the top and bottom edges of a cylinder. Specifically designed for this purpose.

Vertex

Select sets of neighboring vertices and apply to select loops.

The tool will also be able to perform loops on the top and bottom vertices of a cylinder. Specifically designed for this purpose.

<bool>PolyToolsSelect.	 Ring ()   

Selects a ring based on current sub-object selection:

Sub-Object Level

Function

Polygon

Select a few polygons in a row and apply to select ring. If you select more rows, more rings can be made if the additional rows are going in the same direction as the first.

Edge

Works like the normal edge ring tool.

Vertex

Select a few vertices in a row and apply to select ring. If you select more rows, more rings can be made if the additional rows are going in the same direction as the first.

<bool>PolyToolsSelect.GrowLoop () 

Grows a loop based on current sub-object selection:

Sub-Object Level

ShiftPressed = False

ShiftPressed = True

Polygon

Works if 2 or more polygons in a row are selected. Select polygons on crossing loop to turn and keep growing loop.

 

Edge

Grow edge loop in steps.

The tool will also be able to grow loops on the top and bottom edges of a cylinder. Specifically designed for this purpose.

Vertex

Select sets of neighboring vertices and apply to grow loops.

The tool will also be able to grow loops on the top and bottom vertices of a cylinder. Specifically designed for this purpose.

<bool>PolyToolsSelect.ShrinkLoop () 

Shrinks a loop based on current sub-object selection:

Sub-Object Level

Function

Polygon

Shrink polygon loop.

Edge

Shrink edge loop.

Vertex

Shrink vertex loop.

<bool>PolyToolsSelect.GrowRing () 

Grows the edge ring based on current sub-object selection:

Sub-Object Level

Function

Polygon

Grow polygon ring.

Edge

Grow edge ring.

Vertex

Grow vertex ring.

<bool>PolyToolsSelect.ShrinkRing () 

Shrinks the edge ring based on current sub-object selection:

Sub-Object Level

Function

Polygon

Shrink polygon ring.

Edge

Shrink edge ring.

Vertex

Shrink vertex ring.

<bool>PolyToolsSelect.DotLoop <integer>value <bool>cylinderEnds <bool>opposite 

Selects sub-object elements in a loop (or ring for edges) with gaps defined by the first argument.

Multiple dotted loops/rings can be performed at once.

In polygon and vertex sub-object level that requires the sets of initial selections to not be surrounded by any other selected elements.

Sub-Object Level

ShiftPressed = FalseAltPressed = False

ShiftPressed = TrueAltPressed = False

AltPressed = True

Polygon

Select sets of 2 or more polygons in a row and apply to select polygon loops with gaps.

Shift which polygons will act as the first in the loops.

No effect

Edge

Select edges and apply to select edge loops with gaps.

Select edges and apply to select edge rings with gaps.

The tool will also be able to perform a loop on the top and bottom edges of a cylinder.

Vertex

Select sets of 2 or more vertices in a row and apply to select vertex loops with gaps.

Shift which vertices will act as the first in the loops.

The tool will also be able to perform a loop on the top and bottom edges of a cylinder.

<bool>PolyToolsSelect.DotRing <integer>value 

Selects sub-object elements in a ring with gaps defined by the argument.

Multiple dotted loops/rings can be performed at once.

In polygon and vertex sub-object level that requires the sets of initial selections to not be surrounded by any other selected elements.

Sub-Object Level

ShiftPressed = FalseAltPressed = False

ShiftPressed = TrueAltPressed = False

AltPressed = True

Polygon

Select sets of 2 or more polygons in a row and apply to select polygon loops with gaps.

Shift which polygons will act as the first in the loops.

No effect

Edge

Select edges and apply to select edge loops with gaps.

Select edges and apply to select edge rings with gaps.

The tool will also be able to perform a loop on the top and bottom edges of a cylinder.

Vertex

Select sets of 2 or more vertices in a row and apply to select vertex loops with gaps.

Shift which vertices will act as the first in the loops.

The tool will also be able to perform a loop on the top and bottom edges of a cylinder.

<bool>PolyToolsSelect.StepLoop <bool>longestDir 

Selects vertices, edges or faces on sub-object loops between two selected elements.

If the loop is closed, the shortest distance will be picked unless longestDir is passed as true, in which case the longest distance will be selected.

Sub-Object Level

AltPressed = False

AltPressed = True

Polygon

Select two polygons on polygon loop and apply to select elements in between.

If the loop is closed then the longest distance will be selected instead of the shortest like default.

Edge

Select two edges on edge loop and apply to select elements in between.

If the loop is closed then the longest distance will be selected instead of the shortest one.

Vertex

Select two vertices on vertex loop and apply to select elements in between.

If the loop is closed then the longest distance will be selected instead of the shortest one.

<bool>PolyToolsSelect.Outline () 

Outlines current sub-object selection.

Selects the outer border.

Sub-Object Level

ShiftPressed = False

ShiftPressed = True

Polygon

Selects the polygon border of the current polygon selection.

Selects the edge border of the current polygon selection.

Edge

Selects the edge border of the current edge selection.

 

Vertex

Selects the vertex border of the current vertex selection.

 
<bool>PolyToolsSelect.Fill () 

Fills the area between 2 selected sub-object elements. Note that this method will only work well if there is not an extreme angle between the 2 selected sub-object elements.

Sub-Object Level

Shift NotPressed

ShiftPressed

Polygon

Select 2 polygons and apply to fill the area between them. The 2 polygons will become the lower and upper corner of the fill. The outer border of the area to fill needs to be quad polygons.

Select 2 polygons and apply to fill a ring. The 2 polygons will become the lower and upper corner of the fill. The outer border of the area to fill needs to be quad polygons

Edge

Not supported

Not supported

Vertex

Select 2 vertices and apply to fill the area between them. The 2 vertices will become the lower and upper corner of the fill. The outer border of the area to fill needs to be clean loops.

Select 2 vertices and apply to fill a ring. The 2 vertices will become the lower and upper corner of the fill. The outer border of the area to fill needs to be clean loops.

<bool>PolyToolsSelect.FillHole () 

Fills an enclosed area. Select one sub-object element within the hole and fill. The selected part must stand free from the surrounding selection, so as an example the selected polygon can not have any selected polygons right next to it.

Sub-Object Level

Function

Polygon

Select 1 polygon within hole and fill.

Edge

Select 1 edge within hole and fill.

Vertex

Select 1 vertex within hole and fill.

<bool>PolyToolsSelect.Similar <bool>edgeCount <bool>edgeLength <bool>faceCount <bool>faceArea<bool>topology <bool>normal 

Selects sub-object elements which have similar properties as the selected elements. The five arguments define the rules to determine the similarity.

These rules vary depending on the current sub-object level:

Sub-Object Level

Argument1

Argument2

Argument3

Argument4

Argument5

Polygon

Edge Count

Faces with the same number of sides as the selected faces.

Face Areas

Faces with roughly the same area/size as the selected faces.

Topology

Faces with the same surrounding edge topology as the selected faces.

Normal Dir.

Faces that share roughly the same normal direction.

not used

Edge

Edge Lengths

Edges with roughly the same length as the selected edges.

Face Areas

Edges with roughly the same combined face areas of the surrounding facesas the selected edges

Topology

Edges with the same surrounding face topology as the selected edges.

Normal Dir.

Edges that share roughly the same normal direction.

not used

Vertex

Edge Count

Vertices with the same number of edges going from them as the selected vertices.

Edge Length

Vertices with roughly the same combined edge length of the vertices edges as the selected vertices.

Face Counts

Vertices with the same number of surrounding faces as the selected vertices.

Face Areas

Vertices with roughly the same combined facearea of the surrounding faces as the selected vertices.

Normal Dir.

Vertices that share roughly the same normal direction.

Sub-Object Level

Function

Polygon

Select polygon/polygons and apply to select all polygons which are similar based on the above rules.

Edge

Select edge/edges and apply to select all edges which are similar based on the above rules.

Vertex

Select vertex/vertices and apply to select all vertices which are similar based on the above rules.

Select

<bool>PolyToolsSelect.Tops <bool>withinSel 

Selects the tops of extruded parts in the model.

Sub-Object Level

ShiftPressed = False

ShiftPressed = True

Polygon

Apply to select the tops of extruded polygons.

Select the tops of extruded polygons only within the current selection.

Edge

Apply to select the edge outline of the tops of extruded polygons.

Select the edge outline of the tops of extruded polygons only within the current selection.

Vertex

Apply to select the vertices of the tops of extruded polygons.

Select the vertices of the tops of extruded polygons only within the current selection.

<bool>PolyToolsSelect.HardEdges () 

Selects all edges in a model where the faces of the edge do not share the same smoothing-groups.

Note that if the smoothing group value of a face is 0 (no groups set at all), it will shade as hard edge but this method will not detect these hard edges because they are technically sharing a group of 0!

Sub-Object Level

Function

Polygon

Not supported

Edge

Selects all edges in a model where the faces of the edge do not share the same smoothing groups.

Vertex

Not supported

Selection - By Random

<bool>PolyToolsSelect.Random <float>percent <integer>number <integer>type <bool>withinSel 

Selects random sub-object elements by percentage or absolute count.

The first argument is the percentage in the range from 0.0 to 100.0. It is used only when the third argument is set to 1.

The second argument is the absolute sub-object count to select. It is used only when the third argument is set to 0.

The third argument determines the selection mode: 0 = use absolute count; 1 = use percentage.

The fourth argument determines whether to select within all sub-objects or only the selected ones:

Sub-Object Level

ShiftPressed = False

ShiftPressed = True

Polygon

Select random polygons.

Select random polygons only within the current selection.

Edge

Select random edges.

Select random edges only within the current selection.

Vertex

Select random vertices.

Select random vertices only within the current selection

EXAMPLE:

thePlane = Plane widthsegs:20lengthsegs:20 --create a plane
convertTo thePlaneEditable_Poly --convert to EPoly
select thePlane --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Polygon level
PolyToolsSelect.Random0.020 0 false --select 20randompolygons
subObjectLevel = 2 --switch toEdgelevel
PolyToolsSelect.Random50.0 01false --select50% of the edges 
<bool>PolyToolsSelect.RandomGrow () 

Grows the selection by selecting random sub-object elements outside the border of the selection area.

Returns true on success, false on failure.

   

<bool>PolyToolsSelect.RandomShrink () 

Shrinks the selection by deselecting random sub-object elements on the border of the selection.

Returns true on success, false on failure.

   

<bool>PolyToolsSelect.Even <integer>skip <bool>withinSel 

Selects every Nth sub-object element, starting with the second and skipping the number of sub-objects specified by the first argument.

If the second argument is false, all sub-objects will be considered for selection.

If the second argument is true, only already selected sub-objects will be considered.

Returns true on success, false on failure.

   

<bool>PolyToolsSelect.Odd <integer>skip <bool>withinSel 

Selects every Nth sub-object element, starting with the first and skipping the number of sub-objects specified by the first argument.

If the second argument is false, all sub-objects will be considered for selection.

If the second argument is true, only already selected sub-objects will be considered.

Returns true on success, false on failure.

Selection - By Symmetry

   

<bool>PolyToolsSelect.Symmetry <integer>axis 

Selects subobject elements in the mirror axis of a symmetrical model.

The argument defines the axis as follows:

0 - X

1 - Y

2 - Z

The center of the object is determined by the object's pivot point.

Sub-Object Level

Function

Polygon

Select polygons on one side of the model and apply to select polygons on the symmetrical side in the choosen axis.

Edge

Select edges on one side of the model and apply to select edges on the symmetrical side in the choosen axis.

Vertex

Select vertices on one side of the model and apply to select vertices on the symmetrical side in the choosen axis.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{38..40, 49, 50, 59, 60, 70, 80} --select some
--Step2:
PolyToolsSelect.Symmetry0 --select symmetrical along X
--Step3:
PolyToolsSelect.Symmetry1 --select symmetrical along Y 
 

Selection - By Numeric

   

<bool>PolyToolsSelect.NumericVertex <integer>edges <integer>type <bool>withinSel 

Selects vertices based on the number of edges specified as first argument.

The second argument controls the type of comparison as follows:

1 - Equal

2 - Less than

3 - Greater than

The third argument controls whether only vertices within the current vertex selection should be tested (true) or whether all vertices in the object should be used (false).

EXAMPLE:

--Step 1:
p= Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode--switch to modify panel
subObjectLevel = 2 --switch to Edge level
PolyToolsSelect.NumericVertex41false -- vertices with 4 edges
--Step2:
PolyToolsSelect.NumericVertex42false --vertices with less than 4 edges 
 

--Step 2:
PolyToolsSelect.NumericVertex 3 1 false --vertices with 3 edges
--Step 4:
PolyToolsSelect.NumericVertex 2 1 false --vertices with 2 edges 
 

<bool>PolyToolsSelect.NumericEdge <bool>withinSel 

Selects edges that have only one adjacent polygon (a.k.a. "open edges").

The first argument controls whether only edges within the current edge selection should be tested (true) or whether all edges in the object should be used (false).

EXAMPLE:

p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
PolyOp.deleteFaces p #{45..48,58} --delete some faces to add open edges
subObjectLevel = 2 --switch toEdgelevel
PolyToolsSelect.NumericEdge false --select open edges 
 
<bool>PolyToolsSelect.NumericFace <integer>sides <integer>type <bool>withinSel 

Selects faces based on the number of sides specified as first argument.

The second argument controls the type of comparison as follows:

1 - Equal

2 - Less than

3 - Greater than

The third argument controls whether only faces within the current face selection should be tested (true) or whether all faces in the object should be used (false).

Selection - By Half

   

<bool>PolyToolsSelect.Half <integer>axis <bool>invert <bool>withinSel 

Selects half of the sub-object elements at the current Sub-Object Level.

The first argument specifies the axis as follows:

1 - X

2 - Y

3 - Z

The second argument controls whether the positive side of the object (true) or the negative side of the object (false) will be selected.

The third argument controls whether to use the whole object (false) or only the current selection (true).

EXAMPLE:

--Step 1:
s = sphere radius:12 segs:40 wirecolor:blue
convertTo s Editable_Poly --convert to EPoly
select s --select the sphere
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to facelevel
--Step 2: Select positive (right) side along X using all faces
PolyToolsSelect.Half 1 true false
--Step 3: Select negative (front) side along Y using the existing selection
PolyToolsSelect.Half 2 false true
--Step 4:Select positive (top) side along Z using the existing selection
PolyToolsSelect.Half 3 true true
 

Selection - By Normal

   

<bool>PolyToolsSelect.Normal <integer>axis <float>value <bool>invert 

Selects sub-object elements in the current Sub-Object Level based on normal vector.

The first argument defines the reference world axis as follows:

1 - World X

2 - World Y

3 - World Z

The second argument defines the angle threshold. Sub-objects with normals that define an angle with the reference world axis that is less than the threshold will be selected.

The third argument defines whether to select the sub-objects whose normals are below the threshold (false) or the ones whose normals are above the threshold (true).

EXAMPLE:

--Step 1:
s = geosphere radius:12 segs:10 wirecolor:blue pos:[0,0,-5]
convertTo s Editable_Poly --convert to EPoly
select s--select the geosphere
max modify mode --switch to modify panel
subObjectLevel = 1 --switch to Vertex level
PolyToolsSelect.Normal 3 15 false --select vertices within 15 degrees to +Z
--Step2:
subObjectLevel = 2 --switch to Edge level
PolyToolsSelect.Normal 3 15 false --selectedgeswithin 15 degrees to +Z
--Step3:
subObjectLevel = 4 --switch to Face level
PolyToolsSelect.Normal 3 15 false --select faces within 15 degrees to +Z
--Step4:
PolyToolsSelect.Normal 3 15 true --selectfaces outside of15 degrees to +Z 
 

Selection - By Perspective

   

<bool>PolyToolsSelect.Perspective <float>value <bool>outline 

Selects sub-object elements at the current Sub-Object Level whose normals are within the given threshold to the current view's Z axis.

The first argument defines the angle threshold.

The second argument controls whether all sub-objects within the Threshold should be selected (false) or only the ones adjacent to the outline of the selection (true)

EXAMPLE:

--Step 1:
s = geosphere radius:12 segs:10 wirecolor:blue
convertTo s Editable_Poly --convert to EPoly
select s --select the geosphere
max modify mode --switch to modify panel
subObjectLevel = 1 --switch to Vertex level
PolyToolsSelect.Perspective 30 false
--Step 2:
PolyToolsSelect.Perspective 30 true
 

--Step 3:
subObjectLevel = 2 --switch to Edge level
PolyToolsSelect.Perspective 30 false
--Step 4:
PolyToolsSelect.Perspective 30 true
 

--Step 5:
subObjectLevel = 4 --switch to Face level
PolyToolsSelect.Perspective 30 false
--Step 6:
PolyToolsSelect.Perspective 30 true
 

Selection - Grow From Perspective View

   

<bool>PolyToolsSelect.PerspectiveGrow <float>value 

Grows the sub-selection in the current view space by assuming the closest sub-object element to the viewer's position as 0 and growing the selection away from the viewer in world units.

EXAMPLE:

--Step 1:
s = geosphere radius:12 segs:10 wirecolor:blue
convertTo s Editable_Poly --convert to EPoly
select s --select the geosphere
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyToolsSelect.PerspectiveGrow 2
 

--Step 2:
PolyToolsSelect.PerspectiveGrow 12
 

Since the Radius of the Geosphere is 12 units, selecting with a value of 12 selects approximately half of the sphere in the current view (Camera001 - left image).

Selection - By Pivot Distance

   

<bool>PolyToolsSelect.Distance <float>value 

Selects sub-objects in the current level based on a percentage of the largest distance to the pivot point of the object.

The percentage is provided by the first argument.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
t = teapot radius:10 segs:10 wirecolor:blue
convertTo t Editable_Poly --convert to EPoly
select t --select the teapot
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyToolsSelect.Distance 70.0 --and select using 70%
--Step2:
PolyToolsSelect.Distance 60.0 -- select using60% 
 

--Step 3:
s.pivot = [0,0,5] --move pivot up by half the radius
resetxform s --reset XForm
collapseStack s --and collapse the stack
subObjectLevel = 4 --switch toFacelevel
PolyToolsSelect.Distance 70.0 --and select again using 70%
--Step 4:
PolyToolsSelect.Distance 60.0
 

Selection - By Surface

   

<bool>PolyToolsSelect.ConvexConcave <float>value <integer>isConcave 

Selects sub-objects in the current Sub-Object Level based on a convexity/concavity threshold.

The first argument is the threshold value.

The second argument is the index of the Concave/Convex flyout in the UI as follows:

1 - Concave

2 - Convex

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
t = teapot radius:10 segs:10 wirecolor:blue
convertTo t Editable_Poly --convert to EPoly
select t --select theteapot
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Facelevel
PolyToolsSelect.ConvexConcave 0.05 1 --Select Concave Faces
--Step 2:
PolyToolsSelect.ConvexConcave 0.001 2 --Select Convex Faces 
 

Selection - Patterns

   

<bool>PolyToolsSelect.Pattern1 <integer>times 

Applies Selection Pattern 1 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.Pattern1 1
--Step 3:
PolyToolsSelect.Pattern1 1
--Step 4:
PolyToolsSelect.Pattern1 1
--Step 5:
PolyToolsSelect.Pattern1 1
--Step 6:
PolyToolsSelect.Pattern1 1
 

Note that you can achieve the look seen on the above right screenshot by calling

PolyToolsSelect.Pattern1 5

right after evaluating Step 1 to perform the iterations internally.

<bool>PolyToolsSelect.Pattern2 <integer>times 

Applies Selection Pattern 2 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.Pattern2 1
--Step 3:
PolyToolsSelect.Pattern2 1
--Step 4:
PolyToolsSelect.Pattern2 1
--Step 5:
PolyToolsSelect.Pattern2 1
--Step 6:
PolyToolsSelect.Pattern2 1
 

<bool>PolyToolsSelect.Pattern3 <integer>times 

Applies Selection Pattern 3 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch toFacelevel
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.Pattern3 1
--Step 3:
PolyToolsSelect.Pattern3 1
--Step 4:
PolyToolsSelect.Pattern3 1
 

<bool>PolyToolsSelect.Pattern4 <integer>times 

Applies Selection Pattern 4 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch toFacelevel
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.Pattern4 1
--Step 3:
PolyToolsSelect.Pattern4 1
--Step 4:
PolyToolsSelect.Pattern4 1
--Step 5:
PolyToolsSelect.Pattern4 1
--Step 6:
PolyToolsSelect.Pattern4 1
 

<bool>PolyToolsSelect.Pattern5 <integer>times 

Applies Selection Pattern 5 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.Pattern5 1
--Step 3:
PolyToolsSelect.Pattern5 1
--Step 4:
PolyToolsSelect.Pattern5 1
--Step 5:
PolyToolsSelect.Pattern5 1
--Step 6:
PolyToolsSelect.Pattern5 1
--Step 7:
PolyToolsSelect.Pattern5 1
--Step 8:
PolyToolsSelect.Pattern5 1
 

<bool>PolyToolsSelect.Pattern6 <integer>times 

Applies Selection Pattern 6 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch toFacelevel
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.Pattern6 1
--Step 3:
PolyToolsSelect.Pattern6 1
--Step 4:
PolyToolsSelect.Pattern6 1
--Step 5:
PolyToolsSelect.Pattern6 1
--Step 6:
PolyToolsSelect.Pattern6 1
--Step 7:
PolyToolsSelect.Pattern6 1
--Step 8:
PolyToolsSelect.Pattern6 1
 

<bool>PolyToolsSelect.Pattern7 <integer>times 

Applies Selection Pattern 7 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.Pattern7 1
--Step 3:
PolyToolsSelect.Pattern7 1
--Step 4:
PolyToolsSelect.Pattern7 1
--Step 5:
PolyToolsSelect.Pattern7 1
--Step 6:
PolyToolsSelect.Pattern7 1
--Step 7:
PolyToolsSelect.Pattern7 1
--Step 8:
PolyToolsSelect.Pattern7 1
 

<bool>PolyToolsSelect.Pattern8 <integer>times 

Applies Selection Pattern 8 the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45}--select a central face
--Step 2:
PolyToolsSelect.Pattern8 1
--Step 3:
PolyToolsSelect.Pattern8 1
--Step 4:
PolyToolsSelect.Pattern8 1
--Step 5:
PolyToolsSelect.Pattern8 1
--Step 6:
PolyToolsSelect.Pattern8 1
--Step 7:
PolyToolsSelect.Pattern8 1
--Step 8:
PolyToolsSelect.Pattern8 1
 

<bool>PolyToolsSelect.PatternDots <integer>times 

Applies Selection Pattern Dots the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.PatternDots 1
--Step 3:
PolyToolsSelect.PatternDots 1
--Step 4:
PolyToolsSelect.PatternDots 1
--Step 5:
PolyToolsSelect.PatternDots 1
--Step 6:
PolyToolsSelect.PatternDots 1
 

<bool>PolyToolsSelect.PatternChecker <integer>times 

Applies Selection Pattern Checker the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.PatternChecker 1
--Step 3:
PolyToolsSelect.PatternChecker 1
--Step 4:
PolyToolsSelect.PatternChecker 1
--Step 5:
PolyToolsSelect.PatternChecker 1
--Step 6:
PolyToolsSelect.PatternChecker 1
 

<bool>PolyToolsSelect.PatternGrowLine <integer>times 

Applies Selection Pattern Grow Line the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.PatternGrowLine1
--Step 3:
PolyToolsSelect.PatternGrowLine1
--Step 4:
PolyToolsSelect.PatternGrowLine1
--Step 5:
PolyToolsSelect.PatternGrowLine1
--Step 6:
PolyToolsSelect.PatternGrowLine1
 

<bool>PolyToolsSelect.PatternOneRing <integer>times 

Applies Selection Pattern One Ring the specified number of times.

Returns true on success, false on failure, of example if not in a valid sub-object mode.

EXAMPLE:

--Step 1:
p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Face level
PolyOp.SetFaceSelection p #{45} --select a central face
--Step 2:
PolyToolsSelect.PatternOneRing 1
--Step 3:
PolyToolsSelect.PatternOneRing 1
--Step 4:
PolyToolsSelect.PatternOneRing 1
--Step 5:
PolyToolsSelect.PatternOneRing 1
--Step 6:
PolyToolsSelect.PatternOneRing 1
 

Selection - By Bitmap

<bool>PolyToolsSelect.BitmapToSel <string>file <integer>mapchannel <point3>color 

Selects sub-objects in the current Sub-Object Level based on a color from a bitmap file using a given mapping channel for the bitmap application.

The first argument is the file name of the bitmap.

The second argument is the mapping channel to use for the mapping of the bitmap onto the geometry.

The third argument is the color from the bitmap to use for selecting.

Internally, the color will be compared with a built-in threshold of +/- 8.0 (256/8= 32, so the threshold is 1/32 or about 3%).

EXAMPLE:

--Step 1:
p = Plane widthsegs:50 lengthsegs:50 wirecolor:blue --create a plane
convertTo p Editable_Poly --convert to EPoly
select p --select the plane
max modify mode --switch to modify panel
subObjectLevel = 4 --switch to Edge level
--Select faces where the bitmap color is pure white.
PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 white
--Step 2: Select faces where color is black.
PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 black
 

--Step 3:
PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.97)
--Step 4:
PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.96)
 

--Step 3:
PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.04)
--Step 4:
PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.03)
 

See Also