Go to: Synopsis. Return value. Related. Flags. Python examples.
polyBooleanCmd([addMesh=name], [changeSmoothMesh=[name, boolean]], [classification=int], [interactiveUpdate=boolean], [newInputDisplay=int], [newInputOperation=int], [operation=int], [removeMesh=name], [reorderMesh=[name, int]])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
polyBooleanCmd is undoable, queryable, and editable.
This command creates a new poly as the result of a boolean operation on input polys.
In query mode, return type is based on queried flag.
polySeparate, polyUnite
addMesh, changeSmoothMesh, classification, interactiveUpdate, newInputDisplay, newInputOperation, operation, removeMesh, reorderMesh
Long name (short name) |
Argument types |
Properties |
|
addMesh(am)
|
name
|
|
|
Add a new mesh to the boolean stack.
|
|
changeSmoothMesh(csm)
|
[name, boolean]
|
|
|
Set one of the inputs to use a smoothed version of the mesh.
|
|
classification(cls)
|
int
|

|
|
Changes how intersections of open and closed manifolds are treated.
1 = Edge. 2 = Normal. 3 = Auto
|
|
interactiveUpdate(iu)
|
boolean
|

|
|
Changes how interactive manipulation of input meshes trigger updates of the boolean node.
If true, will trigger compute while dragging a manipulator.
If false, will not trigger a compute until the manipulator is released.
|
|
newInputDisplay(nid)
|
int
|

|
|
Default display mode to apply to new inputs.
0 = Wireframe. 1 = Shaded. 2 = Bounding Box. 3 = X-Ray. 4 = Hidden.
|
|
newInputOperation(nio)
|
int
|

|
|
Default boolean operation to apply to new inputs if not specified. Values are:
1=Union, 2=Difference A-B, 3=Intersection, 4=Difference B-A, 5=Split, 6=Split Edges, 7=Hole Punch, 8=Cut Out
|
|
operation(op)
|
int
|

|
|
Specifies the boolean operation to run. Values are:
1=Union, 2=Difference A-B, 3=Intersection, 4=Difference B-A, 5=Split, 6=Split Edges, 7=Hole Punch, 8=Cut Out
|
|
removeMesh(rm)
|
name
|
|
|
Remove a mesh from the boolean stack.
|
|
reorderMesh(rom)
|
[name, int]
|
|
|
Change the position of a mesh in the boolean stack to a specific index.
|
|
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
import maya.cmds as cmds
# Create a few objects
cmds.polyTorus()
cmds.polySphere()
cmds.polyCube()
# Diff A-B boolean between the torus and sphere
cmds.polyBooleanCmd( ["pTorus1", "pSphere1"], operation=2 )
# Now add the cube to the existing boolean as a Union
cmds.polyBooleanCmd( "polyBoolean1", edit=True, addMesh="pCube1", operation=1 )