View Full Version : What wrong with my ProBoolean maxscript?

09 September 2009, 03:37 PM
Here is my proboolean maxscript.

ProBoolean.CreateBooleanObject b c 2 0 1; --2 mean Subtraction ,0 mean Reference, 1 mean Retain Original Material

create two boxes: b & c;
cut b with c , but retain the c (do not remove it)
but c disappear after execute it.
And when i look at the config of my ProBoolean,
it said it used "move", but i want "reference" .
how can i fix it?

09 September 2009, 04:41 PM
it's one of a stupid bugs in MAX which for any reason max's developers don't want to fix over the time of four years. Here is a workaround:

fn getBooleanHWND =
hwnd = undefined
for c in (windows.getChildrenHWND #max) while hwnd == undefined where c[4] == "RollupPanelTitle" and c[5] == "Pick Boolean" do
hwnd = UIAccessor.GetParentWindow c[1]
fn setAddMethod method hwnd: update:on =
if hwnd == unsupplied do hwnd = getBooleanHWND()
if hwnd != undefined do
name = case method of
0: "Reference"
1: "Copy"
2: "Move"
3: "Instance"
default: "Copy"
if (bt = windows.getChildHWND hwnd name) != undefined do UIAccessor.PressButton bt[1]
if update do select selection
delete objects
b = box pos:[ 10,10,10] isSelected:on
c = box();
ProBoolean.setoperandA b
select b
if getCommandPanelTaskMode() != #modify do setCommandPanelTaskMode mode:#modify
if setAddMethod 0 == ok do
ProBoolean.SetBoolOp b 2
ProBoolean.setoperandB b c 0 1
select b

09 September 2009, 02:30 PM

im stuggling with the same problem ..

your workaround isnt working for me :/ all i get is a ProBoolean object with standard setting and Box01 (b) as Operand A.

maybe im doing something wrong?

my workaround atm is to set up one ProBoolean Object by hand and running my script after that. the settings ive done by hand are kept for all other ProBoolean operations made by scripts.

Anyways, I would appreciate a better solution :)


09 September 2009, 03:16 PM
it works for me in max 2009 and max 2010... does it set add method to "Reference"?

09 September 2009, 10:20 AM
hey Denis,

sry, i forgot to mention: Im using max 2008.
It works in max 2009, method is set to "Reference", it does not in max 2010 (method = "Move")

CGTalk Moderation
09 September 2009, 10:20 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.