Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

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

Return value

string[]Object name and node name

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

Flags

caching, center, centerX, centerY, centerZ, constructionHistory, degree, name, nodeState, normal, normalX, normalY, normalZ, object, sideLength1, sideLength2, spansPerSide
Long name (short name) Argument types Properties
center(c) [linear, linear, linear] createqueryedit
The center point of the square.
centerX(cx) linear createqueryedit
X of the center point.
Default: 0
centerY(cy) linear createqueryedit
Y of the center point.
Default: 0
centerZ(cz) linear createqueryedit
Z of the center point.
Default: 0
degree(d) int createqueryedit
The degree of the resulting circle: 1 - linear, 2 - quadratic, 3 - cubic, 5 - quintic, 7 - heptic
Default: 3
normal(nr) [linear, linear, linear] createqueryedit
The normal of the plane in which the square will lie.
normalX(nrx) linear createqueryedit
X of the normal direction.
Default: 0
normalY(nry) linear createqueryedit
Y of the normal direction.
Default: 0
normalZ(nrz) linear createqueryedit
Z of the normal direction.
Default: 1
sideLength1(sl1) linear createqueryedit
The length of a side on the square.
Default: 1.0
sideLength2(sl2) linear createqueryedit
The length of an adjacent side on the square.
Default: 1.0
spansPerSide(sps) int createqueryedit
The number of spans per side determines the resolution of the square.
Default: 1
Common flags
constructionHistory(ch) boolean create
Turn the construction history on or off.
name(n) string create
Sets the name of the newly-created node. If it contains namespace path, the new node will be created under the specified namespace; if the namespace does not exist, it will be created.
object(o) boolean create
Create the result, or just the dependency node.
Advanced flags
caching(cch) boolean createqueryedit
Modifies the node caching mode. See the node documentation for more information.
Note: For advanced users only.
nodeState(nds) int createqueryedit
Modifies the node state. See the node documentation for more information.
Note: For advanced users only.

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.

Python examples

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 )