[Q]uestion: export obj - how to export it based on a preset like "blender" with only one click?

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

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mambrus's picture

Hi O, well, I'm not sure

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

jos's picture

if you use exportFile

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

mambrus's picture

unfortunatelly this doesn't work

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's picture

Hi, Did you try using the

Hi,

Did you try using the #noPrompt keyword?
exportFile #noPrompt

hOpe this helps,
o

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.