I know how to manipulate the preset ini files etc. and how to export objs but I always get the popup of the obj export interface. Is there a way to avoid this?
Thanks!
Markus
Forum topic · General Scripting
By mambrus · 2012-01-25
I know how to manipulate the preset ini files etc. and how to export objs but I always get the popup of the obj export interface. Is there a way to avoid this?
Thanks!
Markus
mambrus · 2012-01-27
Hi O,
well, I'm not sure about this solution.
if I user this:
exportFile (maxfilepath + _fileName) #noPrompt selectedOnly:true using:(exporterPlugin.classes[16])
then I wont get the *.OBJ related settings screen, but the output doesn't look the same. It seems to me that the #noPrompt not only disables the settings screen, but also ignores all export presets of this setting screen.
So the exportFile command will export the OBJ just because the "_fileName" include the filetyp e.g. "mymodel.obj". But the common export settings for *.obj files is not what I want to get. I want to use my own settings e.g. the blender preset.
Any ideas?
cheers,
Markus
if you use exportFile
jos · 2012-01-27
if you use
exportFile (maxfilepath + _fileName) #noPrompt selectedOnly:true
without the using: part it will take the settings from the settings screen.
it will export automatically to the extention of your _fileName
unfortunatelly this doesn't work
mambrus · 2012-01-27
Sorry, but the exported data doesn't match the data which I get if I export it manually. As I described before, the exported *.obj file (exported with "exportFile (maxfilepath + _fileName) #noPrompt selectedOnly:true") seems to use the common *.obj export settings and not the specified blender obj preset export settings.
The only way to get the right output (so far) is not to use the #noPromt, but then I get this preset setting screen, which means I can't automate it 100%.
Any solutions ... I mean, I could rewright the obj export tool and write my own geometry files - but this would be overkill ... there must be an easier approach - right?
best regards,
markus
Ofer Zelichover · 2012-01-25
Hi,
Did you try using the #noPrompt keyword?
exportFile #noPrompt
hOpe this helps,
o