Boolean3: GeometryClass

Boolean3 - superclass: GeometryClass; super-superclass:node - classID:#(7bc209af, 1bbac5f) 

The Boolean3 / BooleanObject2 Compound Object Classes let you create compound Boolean objects. Available in 3ds Max 2017 and higher.

Aliases:

Boolean3
BooleanObject2

Constructor:

No constructor, use:

startObjectCreation BooleanObject2

Properties:

.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.

<boolean>GetOperandName <index>index <&string>nameout

nameout is Out parameter

Gets the name of the operand at the specified index.

<boolean>SetOperandName <index>index <index>operandIndex <string>name

Sets the name of the operand at the specified index.

<boolean>GetOperandType <index>index <&enum>type

type enums: {#system|#generated}

type is Out parameter

Gets the operand type at the specified index.

<boolean>GetNumChildren <index>index <&integer>count

count is Out parameter

Gets the number of children for the operand at the specified index.

<boolean>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.

<boolean>SetOperationType <index>index <enum>type

type enums: {#union|#intersection|#subtraction|#merge|#attach|#insert}

Sets the operation type for the operand at the specified index.

<boolean>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.

<boolean>SetOperationOption <index>index <enum>option

option enums: {#none|#imprint|#cookie}

Sets the operation option for the operand at the specified index.

<boolean>GetSolo <index>operandIndex <&boolean>solo

solo is Out parameter

Gets the solo setting for the operand at the specified index.

<boolean>SetSolo <index>operandIndex <boolean>solo

Sets the solo setting for the operand at the specified index.

<boolean>GetSoloOperandIndex <&index>operandIndex

operandIndex is Out parameter
<boolean>GetDisable <index>operandIndex <&boolean>disable
disable is Out parameter

Gets the disabled setting for the operand at the specified index.

bool>SetDisable <index>operandIndex <boolean>disable

Sets the disabled setting for the operand at the specified index.

<boolean>HasSubdivs <index>operandIndex <time>time <&boolean>sub

sub is Out parameter

Indicates whether the operand at the specified index has subdivs.

<boolean>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.

<boolean>SetSubdivs <index>index <time>time <integer>subdivs

Sets the number of subdivs for the operand at the specified index, at the specified time.

<boolean>RemoveOperand <index>operandIndex

Removes the specified operand from the Boolean.

<boolean>AppendOperand <node>boolNode <node>operandNode <boolean>hold
<boolean>InsertOperand <node>boolNode <node>operandNode <index>where <boolean>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