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

Synopsis

textCurves( [string] , [caching=boolean], [font=string], [name=string], [nodeState=int], [object=boolean], [text=string])

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

textCurves is undoable, queryable, and editable.

The textCurves command creates NURBS curves from a text string using the specified font.

A single letter can be made up of more than one NURBS curve. The number of curves per letter varies with the font.

Return value

string[]Object name and node name

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

Flags

caching, font, name, nodeState, object, text
Long name (short name) Argument types Properties
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.
text(t) string create
The string to create the curves for
font(f) string create
The font to use
object(o) boolean create
Create the result shapes, or just the dependency node
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.

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 curves for text string "Maya" in the "Times-Roman" font:
cmds.textCurves( f='Times-Roman', t='Maya' )

# Create curves for text "hello world" in the "Courier" font.
# The "-n" flag specifies the name of the resulting transform
# and shape.
cmds.textCurves( n= 'first', f='Courier', t='hello world' )