Go to: Synopsis. Return value. Related.
Flags. Python
examples.
trim( objects , [caching=boolean], [constructionHistory=boolean],
[locatorU=float], [locatorV=float], [name=string], [nodeState=int], [object=boolean], [selected=int], [shrink=boolean], [tolerance=linear])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
trim is undoable, queryable, and editable.
This command trims a surface to its curves on surface by first
splitting the surface and then selecting which regions to keep or
discard.
string[] |
Object name and node name. |
In query mode, return type is based on queried flag.
intersect, projectCurve, untrim
caching, constructionHistory, locatorU, locatorV,
name, nodeState, object,
selected, shrink, tolerance
Long name (short name) |
Argument types |
Properties |
locatorU(lu) |
float |
    |
|
u parameter value to position a locator on the surface.
Default: 0.5 |
|
locatorV(lv) |
float |
    |
|
v parameter value to position a locator on the surface.
Default: 0.5 |
|
selected(sl) |
int |
   |
|
Specify whether to keep or discard selected regions.
Default: 0 |
|
shrink(sh) |
boolean |
   |
|
If true, shrink underlying surface to outer boundaries of
trimmed surface.
Default: false |
|
tolerance(tol) |
linear |
   |
|
The tolerance with which to trim.
Default: 0.001 |
|
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
# Keep all selected regions
cmds.trim( sl=0 )
# Discard all selected regions
cmds.trim( sl=1 )
# shrink the underlying surface to just outside the
# outermost boundary curve
cmds.trim( sh=1 )