Go to: Synopsis. Return value. Flags. Python examples.
nurbsSquare([caching=boolean], [center=[linear, linear, linear]],
[centerX=linear], [centerY=linear], [centerZ=linear], [constructionHistory=boolean],
[degree=int], [name=string], [nodeState=int], [normal=[linear, linear, linear]],
[normalX=linear], [normalY=linear], [normalZ=linear], [object=boolean], [sideLength1=linear], [sideLength2=linear], [spansPerSide=int])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
nurbsSquare is undoable, queryable, and editable.
The nurbsSquare command creates a square
string[] |
Object name and node name |
In query mode, return type is based on queried flag.
caching, center, centerX,
centerY, centerZ, constructionHistory, degree, name, nodeState, normal,
normalX, normalY, normalZ,
object, sideLength1, sideLength2, spansPerSide
Long name (short name) |
Argument types |
Properties |
normal(nr) |
[linear, linear, linear] |
   |
|
The normal of the plane in which the square will lie. |
|
normalX(nrx) |
linear |
   |
|
X of the normal direction.
Default: 0 |
|
normalY(nry) |
linear |
   |
|
Y of the normal direction.
Default: 0 |
|
normalZ(nrz) |
linear |
   |
|
Z of the normal direction.
Default: 1 |
|
center(c) |
[linear, linear, linear] |
   |
|
The center point of the square. |
|
centerX(cx) |
linear |
   |
|
X of the center point.
Default: 0 |
|
centerY(cy) |
linear |
   |
|
Y of the center point.
Default: 0 |
|
centerZ(cz) |
linear |
   |
|
Z of the center point.
Default: 0 |
|
sideLength1(sl1) |
linear |
   |
|
The length of a side on the square.
Default: 1.0 |
|
sideLength2(sl2) |
linear |
   |
|
The length of an adjacent side on the square.
Default: 1.0 |
|
degree(d) |
int |
   |
|
The degree of the resulting circle: 1 - linear, 2 - quadratic,
3 - cubic, 5 - quintic, 7 - heptic
Default: 3 |
|
spansPerSide(sps) |
int |
   |
|
The number of spans per side determines the resolution of the
square.
Default: 1 |
|
Advanced flags |
caching(cch) |
boolean |
   |
|
Modifies the node caching mode. See the node documentation for
more information.
Note: For advanced users only. |
|
nodeState(nds) |
int |
   |
|
Modifies the node state. See the node documentation for more
information.
Note: For advanced users only. |
|
Common flags |
name(n) |
string |
 |
|
Name the resulting object |
|
constructionHistory(ch) |
boolean |
 |
|
Turn the construction history on or off |
|
object(o) |
boolean |
 |
|
Create the result, or just the dependency node |
|
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 have multiple arguments, passed
either as a tuple or a list. |
import maya.cmds as cmds
# create degree 1 square with side length 2, center (0,0,0) on the
# x-y plane
cmds.nurbsSquare( nr=(0, 0, 1), d=1, c=(0, 0, 0), sl1=2, sl2=2 )
# create degree 2 rectangle with length 2,4 at origin on the x-y plane
cmds.nurbsSquare( d=2, nr=(0, 0, 1), c=(0, 0, 0), sl1=2, sl2=4 )
# create square of degree 3,side lengths 3, 4 spans per side
cmds.nurbsSquare( nr=(0, 0, 1), c=(0, 0, 0), d=3, sl1=3, sl2=3, sps=4 )