Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

polySelectConstraint [-angle int] [-anglebound angle angle] [-border boolean] [-convexity int] [-crease boolean] [-disable] [-dist int] [-distaxis float float float] [-distbound float float] [-distpoint float float float] [-edgeDistance uint] [-geometricarea int] [-geometricareabound float float] [-holes int] [-length int] [-lengthbound float float] [-max2dAngle float] [-max3dAngle float] [-mode int] [-nonmanifold int] [-order int] [-orderbound int int] [-orient int] [-orientaxis float float float] [-orientbound float float] [-planarity int] [-propagate int] [-random int] [-randomratio float] [-shell boolean] [-size int] [-smoothness int] [-stateString] [-textured int] [-texturedarea int] [-texturedareabound float float] [-textureshared int] [-topology int] [-type int] [-visibility int] [-visibilityangle angle] [-visibilitypoint float float float] [-where int] [-wholeSensitive boolean]

polySelectConstraint is undoable, queryable, and NOT editable.

Changes the global polygonal selection constraints.

Return value

None

In query mode, return type is based on queried flag.

Related

polyInstallAction, polyListComponentConversion, polySelectConstraintMonitor

Flags

angle, anglebound, border, convexity, crease, disable, dist, distaxis, distbound, distpoint, edgeDistance, geometricarea, geometricareabound, holes, length, lengthbound, max2dAngle, max3dAngle, mode, nonmanifold, order, orderbound, orient, orientaxis, orientbound, planarity, propagate, random, randomratio, shell, size, smoothness, stateString, textured, texturedarea, texturedareabound, textureshared, topology, type, visibility, visibilityangle, visibilitypoint, where, wholeSensitive
Long name (short name) Argument types Properties
-wholeSensitive(-ws) boolean createquery
Tells how to select faces : either
by picking anywhere inside the face (if true)
or by picking on the face center marker (if false).
-disable(-dis) create
Toggles off all constraints for all component types, but leaves the other constraint parameters.
This flag may be used together with other ones toggling some constraints on : if so, all constraints are disabled first (no matter the position of the -disable flag in the command line) then the specified ones are activated.
-stateString(-sts) query
Query only flag. Returns the MEL command that would restore all the current settings.
-type(-t) int createquery

0x0000(none)
0x0001(vertex)
0x8000(edge)
0x0008(face)
0x0010(texture coordinates)
-shell(-sh) boolean createquery
If true, selection will be extended to all connected components so that the whole piece of object is selected.
-border(-bo) boolean createquery
If true, selection will be extended to all connected border components so that the whole "loop" is selected.
-crease(-cr) boolean createquery
If true, selection will be extended to all connected creased components.
-propagate(-pp) int createquery
0(Off) 1(More) 2(Less) 3(Border) 4(Contiguous Edges).
More : will add current selection border to current selection.
Less : will remove current selection border from current selection.
Border : will keep only current selection border.
Contiguous Edges : Add edges aligned with the current edges selected. The direction and number of edges selected is controlled by the -m2a, -m3a, and -ed flags.
-mode(-m) int createquery
0(Off) 1(Next) 2(Current and Next) 3(All and Next).
Off : no constraints are used at all.
Next : constraints will be used to filter next selections.
Current and Next : constraints will be aplied on current selection and then used to filter next selections.
All and Next : all items satisfying constraints are selected.
-where(-w) int createquery
0(off) 1(on border) 2(inside).
-nonmanifold(-nm) int createquery
0(off) 1(on)
-smoothness(-sm) int createquery
0(off) 1(hard) 2(smooth).
-max2dAngle(-m2a) float create
Maximum angle between two consecutive edges in the 2d tangent plane for "Contiguous Edges" propagate mode.
-max3dAngle(-m3a) float create
Maximum angle between two consecutive edges in 3d space for "Contiguous Edges" propagate mode.
-edgeDistance(-ed) uint create
Maximum distance (number of edges) to extend the edge selection for "Contiguous Edges" propagate mode. 0 means to ignore the distance constraint.
-size(-sz) int createquery
0(off) 1(triangles) 2(quads) 3(nsided).
-planarity(-p) int createquery
0(off) 1(non planar) 2(planar).
-convexity(-c) int createquery
0(off) 1(concave) 2(convex).
-holes(-h) int createquery
0(off) 1(holed) 2(non holed).
-textured(-tx) int createquery
0(off) 1(mapped) 2(unmapped).
-topology(-tp) int createquery
0(off) 1(non triangulatable) 2(lamina) 3(non triangulatable and lamina)
-length(-l) int createquery
0(off) 1(on).
-lengthbound(-lb) float float createquery
min and max lengths.
-angle(-a) int createquery
0(off) 1(on).
-anglebound(-ab) angle angle createquery
min and max angles.
For vertices : angle between the 2 edges owning the vertex.
For edges : angle between the 2 faces owning the edge.
-geometricarea(-ga) int createquery
0(off) 1(on).
-geometricareabound(-gab) float float createquery
min and max areas.
-texturedarea(-ta) int createquery
0(off) 1(Area specified is unsigned) 2(Area specified is signed).
-texturedareabound(-tab) float float createquery
min and max areas.
-textureshared(-ts) int createquery
0(off) 1(on). This option will select any uvs on the currentMap which are shared by more than one vertex
-dist(-d) int createquery
0(off) 1(to point) 2(to axis) 3(to plane).
-distbound(-db) float float createquery
min and max distances.
-distpoint(-dp) float float float createquery
point. (Axis/plane origin in case of distance to axis/plane).
-distaxis(-da) float float float createquery
axis. (Normal to the plane in case of distance to plane).
-orient(-o) int createquery
0(off) 1(orientation) 2(direction).
-orientbound(-ob) float float createquery
min and max angles.
-orientaxis(-oa) float float float createquery
axis.
-order(-or) int createquery
0(off) 1(on).
-orderbound(-orb) int int createquery
min and max orders. number of owning edges.
-visibility(-v) int createquery
0(off) 1(on).
-visibilityangle(-va) angle createquery
angle [0,360].
-visibilitypoint(-vp) float float float createquery
point.
-random(-r) int createquery
0(off) 1(on).
-randomratio(-rr) float createquery
ratio [0,1].

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

   selectMode -co;

// <b>Propagation</b>

   polyPlane -n plg -w 5 -h 5; delete plg.f[20:29]; selectType -pf true;
   polySelectConstraint -sh true; // next mouse selections will propagate to all shell
   polySelectConstraint -sh false;
   polySelectConstraint -bo true; // next mouse selections will propagate along border
   polySelectConstraint -bo false;
   polySelectConstraint -cr true; // next mouse selections will propagate to all connected creased components
   polySelectConstraint -cr false;

   select plg.f[54:55]; polySelectConstraint -pp 1;
   polySelectConstraint -pp 1; polySelectConstraint -pp 1; // to get more and more
   polySelectConstraint -pp 2; // to get less
   polySelectConstraint -pp 3; // to get selection border
   delete plg;

//<b>Properties</b>

//location
   polyPlane -n plg -w 5 -h 5; selectType -pv true;
   polySelectConstraint -m 3 -t 1 -w 1; // to get border vertices
   polySelectConstraint -m 3 -t 1 -w 2; // to get inner vertices
   polySelectConstraint -w 0;           // turn off location constraint
   delete plg;

//edge smoothness
   polyCylinder -n plg; selectType -pe true;
   polySelectConstraint -m 3 -t 0x8000 -sm 1; // to get hard edges
   polySelectConstraint -m 3 -t 0x8000 -sm 2; // to get soft edges
   polySelectConstraint -sm 0;                   // turn off edge smoothness constraint
   delete plg;

//face size
   polyCylinder -n plg -sz 1; delete plg.f[40:59]; polyCloseBorder plg.e[27];
   selectType -pf true;
   polySelectConstraint -m 3 -t 8 -sz 1; // to get triangles
   polySelectConstraint -m 3 -t 8 -sz 2; // to get quads
   polySelectConstraint -m 3 -t 8 -sz 3; // to get N-sided
   polySelectConstraint -sz 0;              // turn off face size constraint
   delete plg;

//face planarity
//    polyPlane -n plg -w 5 -h 5; polyMoveVertex -ltz 1 plg.vtx[79] plg.vtx[85];
   selectType -pf true;
   polySelectConstraint -m 3 -t 8 -p 1; // to get non-planar faces
   polySelectConstraint -m 3 -t 8 -p 2; // to get planar faces
   polySelectConstraint -p 0;             // turn off face planarity constraint
   delete plg;

//face convexity
   polyPlane -n plg -w 5 -h 5; delete plg.f[51] plg.f[61] plg.f[52:53];
   polyCloseBorder plg.e[146];    selectType -pf true;
   polySelectConstraint -m 3 -t 8 -c 1; // to get non-convex faces
   polySelectConstraint -m 3 -t 8 -c 2; // to get convex faces
   polySelectConstraint -c 0;             //  turn off face convexity constraint
   delete plg;

//face holes
   polyCreateFacet -n plg -p -2 2 0 -p -2 -2 0 -p 2 -2 0 -p 2 2 0 ;
   polyAppend -ed 2 -p 6 -2 0 -p 6 2 0 -hl -p 3 1 0 -p 3 -1 0 -p 5 0 0 ;
   selectType -pf true;
   polySelectConstraint -m 3 -t 8 -h 1; // to get holed faces
   polySelectConstraint -m 3 -t 8 -h 2; // to get non-holed faces
   polySelectConstraint -h 0;           // turn off hole constraint
   delete plg;

//face mapping
   polyPlane -n plg -w 5 -h 5; polyMapDel plg.f[60:69];
   selectType -pf true;
   polySelectConstraint -m 3 -t 8 -tx 1; // to get mapped faces
   polySelectConstraint -m 3 -t 8 -tx 2; // to get non-mapped faces
   polySelectConstraint -tx 0;              // turn off face mapping constraint
   delete plg;

//face topology
   polyCreateFacet -n plg -p -3 3 0 -p -3 -3 0 -p 3 -3 0 -p 3 3 0 ;
   polyAppend -ed 2 -p 8 -3 0 -p 8 3 0 ;
   polyAppend -ed 4 -ed 6 -ed 5;
   polyAppend -ed 0 -p -7 2 0 -p -7 -1 0 -p -8 2 0 -p -5 4 0 ;
   selectType -pf true;
   polySelectConstraint -m 3 -t 8 -tp 1; // to get non triangulatable faces
   polySelectConstraint -m 3 -t 8 -tp 2; // to get lamina faces
   polySelectConstraint -tp 0;           // turn off the face topology constraint
   delete plg;

//<b>Length</b>
   polyCylinder -n plg -sz 1 -h 3; selectType -pe true;
   polySelectConstraint -m 3 -t 0x8000 -l on -lb 2 4;  // to get edges of length 2 to 4 units
   polySelectConstraint -m 3 -t 0x8000 -l on -lb 1 2;  // to get edges of length 1 to 2 units
   polySelectConstraint -l off;                        // turn off the length constraint
   delete plg;

//<b>Angle</b>
   polyCube -n plg -w 5 -h 5 -d 5; polyBevel -sg 1 plg.e[7];
   polyBevel -sg 3 plg.e[9]; selectType -pe true;
   polySelectConstraint -m 3 -t 0x8000 -a on -ab 0 89; // to get edges with angle between 0-89
   polySelectConstraint -m 3 -t 0x8000 -a on -ab 45 89;// to get edges with angle between 45-89
   polySelectConstraint -a off;                        // turn off angle constraint
   delete plg;

//<b>3D Area</b>
   polyPlane -n plg -w 5 -h 5; polyMoveFacet -ls .5 .5 0 plg.f[70:79];
   selectType -pf true;
   polySelectConstraint -m 3 -t 8 -ga on -gab 0 0.2;    // to get faces with area between 0 and 0.2
   polySelectConstraint -m 3 -t 8 -ga on -gab 0.2 0.3;    // to get faces with area between 0 and 0.2
   polySelectConstraint -ga off;                        // turn off 3D area constraint
   delete plg;

//<b>2D area</b>
   polyCylinder -n plg; selectType -pf true;
   polySelectConstraint -m 3 -t 8 -ta on -tab 0 0.5;    // to get face with texture area between 0-0.5
   polySelectConstraint -ta off;                        // turn off the 2D area constraint
   delete plg;

//<b>Distance</b>
   polyPlane -n plg -w 5 -h 5; selectType -pv true;
   polySelectConstraint -m 3 -t 1 -d 1 -db 0 5 -dp 5 0 0;  // to get vertices located
                                                         // between 0-5 units from a given point
   polySelectConstraint -m 3 -t 1 -d 1 -db 5 5 -dp 5 0 0 ; // to get vertices located
                                                         // at exactly 5 units from a given point
   polySelectConstraint -m 3 -t 1 -d 2 -db 5 6 -dp 5 0 0 ; // to get vertices located
                                                         // between 5-6 units from a given axis
   polySelectConstraint -d 0;                                // turn off the distance constraint
   delete plg;

//<b>Orientation</b>
   polySphere -n plg; selectType -pv true;
   polySelectConstraint -m 3 -t 1 -o 1 -ob 0 30 -oa 0 1 0; // to get vertices oriented between
                                                           // 0-30 degree to a given axis
   polySelectConstraint -m 3 -t 1 -o 2 -ob 0 30 -oa 0 1 0;
   polySelectConstraint -o 0;                                // turn off the orintation constraint
   delete plg;

//<b>Order (Neighbor)</b>
   polyPlane -n plg -w 5 -h 5; selectType -pv true;
   polySelectConstraint -m 3 -t 1 -or on -orb 0 2;  // to get vertices with 0 to 2 neighbors
   polySelectConstraint -or off;                     // turn off the order (neighbor) constraint
   delete plg;

//<b>Visibility</b>
   polySphere -n plg; selectType -pv true;
   polySelectConstraint -m 3 -t 1 -v on -va 60 -vp 10 0 0 ; // to get vertices in the 60 degree angle
                                                          // from a given point
   polySelectConstraint -v off;                             // turn off the visbility constraint
   delete plg;

//<b>Random</b>
   polyPlane -n plg -w 5 -h 5; selectType -pv true;
   polySelectConstraint -m 3 -t 1 -r on -rr .5;
   polySelectConstraint -r off;                            // turn off the random constraint
   delete plg;

// NOTE: Make sure you turn off the constraint you have used. Otherwise it may
// affect your next selection (if <i>mode</i> flag is ON).