Dialog closing before it's suppose to

Dialog closing before it's suppose to

kenc
Advocate Advocate
310 Views
0 Replies
Message 1 of 1

Dialog closing before it's suppose to

kenc
Advocate
Advocate

Hi All

 

I've wriiten a script that uses dialogs and works great from the editor.

 

I've now incorporated it into a macroscript with a filein command and things are not happening when they are supposes to.

 

my macroscript is

 

macroScript Render_Stills_360 category:"Aareas"
(
filein "O:\\Max Scripts\\Utilities\\Animator Scripts\\360RenderStills.ms"
)

 

my script is (or portion of script is)

 

global.........

 

rollout mergingfile " MERGING MODEL"
(
   label lbl1
   label lbl2 "MERGING MODEL" align:#center
   label lbl3
)

 

merge_file_path = undefined
while merge_file_path == undefined do
(
   merge_file_path = getOpenFileName caption:"SELECT FILE TO MERGE:" types:"Material(*.max)"
)
createdialog mergingfile width:250 style:#(#style_border, #style_titlebar) modal:false

mergeMAXFile merge_file_path #select #mergeDups

destroydialog mergingfile

 

What's suppose to happen is, 'mergingfile' dialog is displayed, file is merged and then the 'mergingfile' dialog is destroyed. This works in the editor.

 

When I run it as a macro, the 'mergingfile' dialog closes before the file is merged.

 

I believe the merging is happening on a seperate CPU thread.

 

Thanks in advance.

 

0 Likes
311 Views
0 Replies
Replies (0)