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


fitBspline([caching=boolean], [constructionHistory=boolean], [name=string], [nodeState=int], [object=boolean], [tolerance=linear])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

fitBspline is undoable, queryable, and editable.

The fitBspline command fits the CVs from an input curve and and returns a 3D curve.

Return value

string[]Object name and node name

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


rebuildCurve, smoothCurve


caching, constructionHistory, name, nodeState, object, tolerance
Long name (short name) Argument types Properties
tolerance(tol) linear createqueryedit
Tolerance for the fit. The resulting curve will be kept within tolerance of the given points.
Default: 0.1
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.
Common flags
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.
constructionHistory(ch) boolean create
Turn the construction history on or off
object(o) boolean create
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.

Python examples

import maya.cmds as cmds

cmds.curve( d=1, p=((0.2662494, 0, 10.640916), (-4.71138, 0, 7.070603), (-7.849212, 0, 1.051444), (-6.646792, 0, -3.475301), (-2.499369, 0, -3.770414), (2.041102, 0, -1.381914), (5.408074, 0, 3.095469)), k=(0, 1, 2, 3, 4, 5, 6) )

cmds.fitBspline( ch=1, tol=0.01 )