View Full Version : What wrong with my ProBoolean maxscript?
gohkgohk 09-12-2009, 03:37 PM Here is my proboolean maxscript.
b=box();
b.pos=[10,10,10]
c=box();
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?
thx
|
|
denisT
09-12-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]
)
hwnd
)
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
ok
)
)
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
)
froyd
09-23-2009, 02:30 PM
hey,
i´m 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 i´m doing something wrong?
my workaround atm is to set up one ProBoolean Object by hand and running my script after that. the settings i´ve done by hand are kept for all other ProBoolean operations made by scripts.
Anyways, I would appreciate a better solution :)
froyd
denisT
09-23-2009, 03:16 PM
it works for me in max 2009 and max 2010... does it set add method to "Reference"?
froyd
09-28-2009, 10:20 AM
hey Denis,
sry, i forgot to mention: I´m using max 2008.
It works in max 2009, method is set to "Reference", it does not in max 2010 (method = "Move")
CGTalk Moderation
09-28-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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.