Go to: Synopsis. Return value. Related. Flags. MEL examples.
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.None
In query mode, return type is based on queried flag.
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
-wholeSensitive(-ws)
|
boolean
|
|
||
|
||||
-disable(-dis)
|
|
|
||
|
||||
-stateString(-sts)
|
|
|
||
|
||||
-type(-t)
|
int
|
|
||
|
||||
-shell(-sh)
|
boolean
|
|
||
|
||||
-border(-bo)
|
boolean
|
|
||
|
||||
-crease(-cr)
|
boolean
|
|
||
|
||||
-propagate(-pp)
|
int
|
|
||
|
||||
-mode(-m)
|
int
|
|
||
|
||||
-where(-w)
|
int
|
|
||
|
||||
-nonmanifold(-nm)
|
int
|
|
||
|
||||
-smoothness(-sm)
|
int
|
|
||
|
||||
-max2dAngle(-m2a)
|
float
|
|
||
|
||||
-max3dAngle(-m3a)
|
float
|
|
||
|
||||
-edgeDistance(-ed)
|
uint
|
|
||
|
||||
-size(-sz)
|
int
|
|
||
|
||||
-planarity(-p)
|
int
|
|
||
|
||||
-convexity(-c)
|
int
|
|
||
|
||||
-holes(-h)
|
int
|
|
||
|
||||
-textured(-tx)
|
int
|
|
||
|
||||
-topology(-tp)
|
int
|
|
||
|
||||
-length(-l)
|
int
|
|
||
|
||||
-lengthbound(-lb)
|
float float
|
|
||
|
||||
-angle(-a)
|
int
|
|
||
|
||||
-anglebound(-ab)
|
angle angle
|
|
||
|
||||
-geometricarea(-ga)
|
int
|
|
||
|
||||
-geometricareabound(-gab)
|
float float
|
|
||
|
||||
-texturedarea(-ta)
|
int
|
|
||
|
||||
-texturedareabound(-tab)
|
float float
|
|
||
|
||||
-textureshared(-ts)
|
int
|
|
||
|
||||
-dist(-d)
|
int
|
|
||
|
||||
-distbound(-db)
|
float float
|
|
||
|
||||
-distpoint(-dp)
|
float float float
|
|
||
|
||||
-distaxis(-da)
|
float float float
|
|
||
|
||||
-orient(-o)
|
int
|
|
||
|
||||
-orientbound(-ob)
|
float float
|
|
||
|
||||
-orientaxis(-oa)
|
float float float
|
|
||
|
||||
-order(-or)
|
int
|
|
||
|
||||
-orderbound(-orb)
|
int int
|
|
||
|
||||
-visibility(-v)
|
int
|
|
||
|
||||
-visibilityangle(-va)
|
angle
|
|
||
|
||||
-visibilitypoint(-vp)
|
float float float
|
|
||
|
||||
-random(-r)
|
int
|
|
||
|
||||
-randomratio(-rr)
|
float
|
|
||
|
||||
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;
float $minAngle = 0.0;
float $maxAngle = 89.0;
if ("radian" == `currentUnit -q -angle -fullName`)
{
$maxAngle = `deg_to_rad $maxAngle`;
}
polySelectConstraint -m 3 -t 0x8000 -a on -ab $minAngle $maxnAngle; // to get edges with angle between 0-89
$minAngle = 45.0;
$maxAngle = 89.0;
if ("radian" == `currentUnit -q -angle -fullName`)
{
$minAngle = `deg_to_rad $minAngle`;
$maxAngle = `deg_to_rad $maxAngle`;
}
polySelectConstraint -m 3 -t 0x8000 -a on -ab $minAngle $maxnAngle;// 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;
float $minAngle = 0.0;
float $maxAngle = 30.0;
if ("radian" == `currentUnit -q -angle -fullName`)
{
$maxAngle = `deg_to_rad $maxAngle`;
}
// to get vertices oriented between 0-30 degree to a given axis
polySelectConstraint -m 3 -t 1 -o 1 -ob $minAngle $maxnAngle -oa 0 1 0;
polySelectConstraint -m 3 -t 1 -o 2 -ob $minAngle $maxnAngle -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).