I'm trying to write a custom fbx exporter that iterates through a selection of groups / components and creates individual fbx files named like the individual group / component names.
Looking at the API docs http://www.sketchup.com/intl/en/developer/docs/ourdoc/model#export, I can only find an option hash for Collada. I'm looking though for the equivalent for fbx.
Anyone a suggestion where to find the option hash for fbx? I only need some of the normal export options checked (see pic).
Edit: seems like Sketchup re-uses the last used manual settings. So for now the problem is 'solved'
[code] Fbx export - option hash?
8 posts
• Page 1 of 1
Re: [code] Fbx export - option hash?
Yes, you have found that only the DAE export options are exposed in the Ruby API. Why none of the others are, I don't know. (But also wonder why?)
Re: [code] Fbx export - option hash?Thanks for the reply Dan. In case the 'why' was referring to me: I'm going back and forth between Sketchup & Unreal a zillion times a day. Going file -> export -> 3d model for every single object I need to export was getting on my nerves. With a ruby it's more streamlined now. I wrongly expected I had to do the export settings (the option hash) in the ruby script but turned out Sketchup is just re-using the last used settings. Re: [code] Fbx export - option hash?
If it's just for you, maybe you can use mouse/keyboard macros? Some softwares could automate what you need
Re: [code] Fbx export - option hash?The other exporters where added before the COLLADA exporter - and never retrofitted with options. We have issue filed for this however.
On this topic, I needed to control the export settings for FBX myself - which I did by modifying the settings stored by each OS. Not a pretty hack, but it works: https://github.com/thomthom/cities-skyl ... ers/fbx.rb Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [code] Fbx export - option hash?Thanks for the replies but I had it already solved. Maybe the last edited line in the first post should have been more clear about that.
Because Sketchup apparently remembers the last used fbx export settings, also from previous sessions, it turned out to be quite simple code. Just iterate through the selection and do a model.export filename , false where filename would be the name of the group/component I wanted to export with .fbx as suffix. Re: [code] Fbx export - option hash?
Yes that IS the WHY I was referring to...
I was thinking of doing the same thing.
Re: [code] Fbx export - option hash?Nice - in V18 the option hashes are added for several file formats.
http://ruby.sketchup.com/file.exporter_options.html
8 posts
• Page 1 of 1
|