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

Synopsis

flow( objects , [divisions=[uint, uint, uint]], [localCompute=boolean], [localDivisions=[uint, uint, uint]], [objectCentered=boolean])

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

flow is undoable, queryable, and editable.

The flow command creates a deformation lattice to `bend' the object that is animated along a curve of a motion path animation. The motion path animation has to have the follow option set to be on.

Return value

string[]The names of the created flow node and associated lattice nodes.

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

Flags

divisions, localCompute, localDivisions, objectCentered
Long name (short name) Argument types Properties
divisions(dv) [uint, uint, uint] query
This flag specifies the number of lattice slices in x,y,z.
The default values are 2 5 2.
When queried, it returns the TuInt32 TuInt32 TuInt32
localCompute(lc) boolean query
This flag specifies whether or not to have local control over the object deformation.
Default value: is on when the lattice is around the curve, and is off when the lattice is around the object.
When queried, it returns a boolean
localDivisions(ld) [uint, uint, uint] query
This flag specifies the extent of the region of effect.
Default values are 2 2 2.
When queried, it returns the TuInt32 TuInt32 TuInt32
objectCentered(oc) boolean query
This flag specifies whether to create the lattice around the selected object at its center, or to create the lattice around the curve.
Default value is true.
When queried, it returns a boolean

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 a simple motion path animation

# create a path, e,g, a curve
path = cmds.curve(d=3,p=[(-10, 0, 0),(-6, 0, 10),(-3, 0, -10),(10, 0, 0)],k=[0, 0, 0, 1, 1, 1])

# create an object, e.g. a sphere
object = cmds.sphere()
cmds.scale( 0.5, 2.0, 0.2 )

# animate the object using a motion path with follow on for 30 frames
cmds.pathAnimation( object[0], f=1, stu=0, etu=30, c=path )

# select only the animated object
cmds.select( object[0], r=True )

# Create flow deformation on the selected object with default values:
cmds.flow()

# Create flow deformation on the selected object with
# the lattice around the path, and lattice division of 3,20,2:
cmds.flow( oc=False, dv=(3, 20, 2) )

# Create flow deformation on the selected object with
# lattice subdivisions 4, 7, and 3:

cmds.flow( dv=(4, 7, 3) )

# When the object is not currently selected, the name of the object
# has to be specified in the command line (note: $object[0] has to
# have a motion path animation):

cmds.flow( object[0], dv=(4, 7, 3) )