Value > MAXWrapper > Node > GeometryClass > Boolean3 |
The Boolean3 / BooleanObject2 Compound Object Classes let you create compound Boolean objects. Available in 3ds Max 2017 and higher.
Aliases:
Boolean3 BooleanObject2
No constructor, use:
startObjectCreation BooleanObject2
.iconsize: float
.materialOption: integer
The Material setting for the Boolean:
0 - Apply Operand Material
1 - Retain Original Material
.displayOption: integer
The Display setting for the Boolean:
0 - Result
1 - Operands
2 - Selected Operands
.displayAsShaded: integer
The Display as Shaded setting:
0 - Off
1 - On
.objects: maxObject array
An array containing the operands in the Boolean, as ReferenceTarget objects.
.operation: int array
An array containing the operand type for each corresponding operand in the .objects array:
0 - Union
1 - Intersect
2 - Subtract
3 - Merge
4 - Attach
5 - Insert
.option: int array
Contains the Imprint/Cookie option for each operand:
0 - No option
1 - Imprint
2 - Cookie
.operand_tm: maxObject array
An array of position controllers for the Boolean's operands.
Methods (from BooleanObject2 Interface):
<integer>GetNumOperands()
Returns the number of operands in the Boolean.
<bool>GetOperandName <index>index <&TSTR>nameout nameout is Out parameter
Gets the name of the operand at the specified index.
<bool>SetOperandName <index>index <&TSTR>name name is In parameter
Sets the name of the operand at the specified index.
<bool>GetOperandType <index>index <&enum>type type enums: {#system|#generated} type is Out parameter
Gets the operand type at the specified index.
<bool>GetNumChildren <index>index <&integer>count count is Out parameter
Gets the number of children for the operand at the specified index.
<bool>GetOperationType <index>index <&enum>type type enums: {#union|#intersection|#subtraction|#merge|#attach|#insert} type is Out parameter
Gets the operation type for the operand at the specified index.
<bool>SetOperationType <index>index <enum>type type enums: {#union|#intersection|#subtraction|#merge|#attach|#insert}
Sets the operation type for the operand at the specified index.
<bool>GetOperationOption <index>index <&enum>option option enums: {#none|#imprint|#cookie} option is Out parameter
Gets the operation option for the operand at the specified index.
<bool>SetOperationOption <index>index <enum>option option enums: {#none|#imprint|#cookie}
Sets the operation option for the operand at the specified index.
<bool>GetSolo <index>operandIndex <&bool>solo solo is Out parameter
Gets the solo setting for the operand at the specified index.
<bool>SetSolo <index>operandIndex <bool>solo
Sets the solo setting for the operand at the specified index.
<bool>GetSoloOperandIndex <&index>operandIndex operandIndex is Out parameter
<bool>GetDisable <index>operandIndex <&bool>disable disable is Out parameter
Gets the disabled setting for the operand at the specified index.
bool>SetDisable <index>operandIndex <bool>disable
Sets the disabled setting for the operand at the specified index.
<bool>HasSubdivs <index>operandIndex <time>time <&bool>sub sub is Out parameter
Indicates whether the operand at the specified index has subdivs.
<bool>GetSubdivs <index>index <time>time <&integer>subdivs <&interval>valid subdivs is Out parameter valid is In and Out parameter
Gets the subdivs for the operand at the specified index, for the specified time and validity.
<bool>SetSubdivs <index>index <time>time <integer>subdivs
Sets the number of subdivs for the operand at the specified index, at the specified time.
<bool>RemoveOperand <index>operandIndex
Removes the specified operand from the Boolean.
<bool>AppendOperand <node>boolNode <node>operandNode <bool>hold
<bool>InsertOperand <node>boolNode <node>operandNode <index>where <bool>hold
Example: |
-- Create a couple of boxes, add them as operands with Union operation boxNum1 = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:34.4026 width:35.2684 height:28.3108 mapcoords:on pos:[-9.23886,6.62539,0] isSelected:on boxNum2 = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:34.6151 width:39.1545 height:16.8113 mapcoords:on pos:[10.8141,-3.6636,5.99007] isSelected:on select boxNum1 -- The following can use “BooleanObject2” or “Boolean3” StartObjectCreation Boolean3 bool = $ -- Add Box2... bool.AppendOperand bool boxNum2 false -- Use it in a union bool.SetOperationType 2 #union -- Use it as subtraction bool.SetOperationType 2 #subtraction -- Delete both operands so have an empty boolean (makes icon appear) bool.RemoveOperand 2 bool.RemoveOperand 1 -- Set icon size big bool.iconSize = 200 -- Set icon size tiny bool.iconSize = 2 |