stl with importFile - Changing settings
I have written script that imports and renders sequences of stl files that I generated in an external program. I use importFile to read in the stl files. When I use the #noprompt option it always uses the default settings rather than my previously used settings (even though without #noprompt the dialog box always contains my most recent settings). Using the default settings is not an option for me as my stl data contain a large amount of fine detail that is smoothed out and eliminated when using the defaults, but imports correctly when using Quick Weld and unchecking Auto Smooth. I am loading a sequence of 1000 files and so pushing enter for each one is a pain in the neck!
Does anyone know how I can either change the default settings or specify my own settings as an option in the importFile command when importing stl files?
I have seen this problem mentioned before, but have never seen a satisfactory solution and so if anyone knows of a solution I would be very grateful.
Comments
`
you can use UIAccessor.PressDefaultButton()
take a look on sample here (by RustyKnight)
http://forums.cgsociety.org/archive/index.php?t-573494.html
I don't know how .stl import window looks. But if you need just press default button - just do import without #noprompt, it will keep your previous settings and UIAccessor will press Yes button.
Thanks
Thank you very much. While it doesn't work using the default button (for some unknown reason "OK" wasn't set as the default button), I did slightly modify that code to press the "OK" button.
In case anyone else is interested, the code that I used to load the sequence of stl files and save them as max files is follows. I have done one load outside the loop so that the default values can be set followed by the rest of them inside the loop with the UIAccessor pressing the button for me: