PDA

View Full Version : MAXscript: ExportFile command


bentllama
10-14-2002, 09:10 PM
Below you will find a MAX script I am working on…

Seeing as you all have helped me greatly in the past, I have another MAXscript question for you. The question is regarding the “#noPrompt” flag on the “ExportFile” command.
I am currently getting error messages and cannot find the documentation on how to properly use the flag…can any of you shed some light on this if you have a spare moment?

Thanks in advance for your help.


-- MAX2FBX-test.ms

-- Exports MAX files in a source directory to FBX files in a destination directory

-- with the same filename as the source MAX files.



Dir = #("C:\\temp\\max2fbxSource\\")



MaxFiles = #()

For d in Dir do Join MaxFiles (getFiles (d + "*.max"))



for f in MaxFiles do

(

LoadMAXFile f ;

-- SaveMaxFile f;

ExportFile ("C:\\temp\\max2fbxExported\\" + getFilenameFile (MaxFileName) + ".fbx") [ #noPrompt ] ;

)

Bobo
10-14-2002, 10:57 PM
Originally posted by bentllama

ExportFile ("C:\\temp\\max2fbxExported\\" + getFilenameFile (MaxFileName) + ".fbx") [b][ #noPrompt ]


A general note about MAXScript documentation syntax:

[ blabla ] in brackets means OPTIONAL parameter. This sort of brackets is used only for indexed access to array elements and sub-anim tracks. In all other cases you will encounter in the help file, they mean you can use or not the part of the command. So you really should delete them from your code.

This is explained under "Syntax Definitions in This Document"

bentllama
10-14-2002, 11:20 PM
Thanks for the reply Bobo. So basically what your saying is I should remove it completely from my script...great.

I now look forward to clicking every dialog box [sometimes 2 or three] that FILMBOX plugins generate when you export out of MAX...and I get to do this to hundreds of files...I am gonna need a new keyboard after I run these scripts...goodbye enter key, I will miss you... *sniff*

so there is no other way to kill these prompts?

Bobo
10-14-2002, 11:25 PM
Originally posted by bentllama
Thanks for the reply Bobo. So basically what your saying is I should remove it completely from my script...great.



No, I said "Get the BRACKETS out of your code". Leave the #noprompt where it is, just not [#noprompt] :)

The brackets denote optional keywords and are not part of the command's syntax, just part of the explanation.

bentllama
10-14-2002, 11:49 PM
MAXScript FileIn Exception

-- Runtime error:importFile: Unknown argument - undefined

The above was my latest error message after removing the brackets...I am soo used to MEL script...this MAX script syntax is driving me batty... please help... :shrug: :shrug: :shrug:

bentllama
10-14-2002, 11:51 PM
whoops... my bad the post above was when i removed the [] and the #

but... when removing the brackets it cycles through my files fine, but the FILMBOX dialog prompt still pops up kfor every darn file...please help...

Bobo
10-15-2002, 12:37 AM
Originally posted by bentllama
whoops... my bad the post above was when i removed the [] and the #

but... when removing the brackets it cycles through my files fine, but the FILMBOX dialog prompt still pops up kfor every darn file...please help...


It might be possible that the FBX export just ignores the option. It might be even possible that every export dialog ignores it. I had no time to test it. My post was a general note about MAXScript Help syntax as it is my area of expertise....

bentllama
10-15-2002, 02:38 AM
Originally posted by Bobo
It might be possible that the FBX export just ignores the option. It might be even possible that every export dialog ignores it. I had no time to test it. My post was a general note about MAXScript Help syntax as it is my area of expertise....

Yeah I starting thinkng that it might be the FBX plugin...makes sense to, cause I have the worst luck...

Looks like i will be clicking away at the Enter key for awhile... :)

bentllama
10-15-2002, 11:02 PM
FYI:



I thought it might be interesting to know that the FBX plugin does bring up the prompt as a child window of the desktop, not as a child window of MAX, therefore MAX cannot close it with a MAXscript command. So I had a buddy of mine write a small executable to deal with the inane prompts.

CGTalk Moderation
01-13-2006, 07:00 PM
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.