[Closed] obj import, #noprompt does not work
Well didn’t Denis mention you can get the Handle and press OK or whatever? That would at least be something I guess…? Sucks though.
I have a script where I could Drag/Drop an Obj into Max without any popups though.
the dialog does not respect the #noprompt file when you use import function.
for export it works, it shows a progress window, no interection.
this is not true for import.
Ok, as i promise i record my screen (max2011):
http://www.youtube.com/watch?v=M8fQtInGb8g
So, no one else get this working?..
move the “using:OBJIMP” part to the end of the line or remove it completly – it autodetects the format by extension anyways. According to the docs the syntax is as follows
importFile <filename_string> [ #noPrompt ] [ using:<maxclass> ]
after you placed the using keyword at the end, the dialog does not open…
Seems to be some error in the keyword parsing code
AFAIK keyword arguments should not require a specific order when passed or something
On a second thought, “using:…” is not really a keyword argument, so this might be position depentant
I have had similar problems to this and have ended up writing callbacks that I turn on as i’m importing via maxscript which auto click things like ok buttons then turns itself off afterwards. Its a big hack but saves a lot of time! Maybe thats something to think about in future…
Hi, i saw there were some problems importing multiple *.obj extensions without noprompt.
With the example below i never had any problems importing multiple *.obj.
fn getfilesOBJ directorie =
(
--delete objects
for f in ( getFiles (directorie + "*.obj")) do
(
lokatie = f as string
file = getFilenameFile f --pak de naam van bestand
print file
importFile lokatie #noPrompt --FN import obj
$selection[1].name = file --rename obj to filename
)
)
filename = getOpenFileName types:"OBJ(*.obj)|*.obj"
directorie = getFilenamePath filename
getfilesOBJ directorie