• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[code] Fbx export - option hash?

Scheduled Pinned Locked Moved Developers' Forum
8 Posts 4 Posters 2.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    kaas
    last edited by 12 May 2015, 15:55

    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'


    fbxout.jpg

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 13 May 2015, 14:25

      @kaas said:

      Anyone a suggestion where to find the option hash for fbx?

      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?)

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • K Offline
        kaas
        last edited by 14 May 2015, 15:46

        @dan rathbun said:

        ...But also wonder why?
        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.

        1 Reply Last reply Reply Quote 0
        • J Offline
          jiminy-billy-bob
          last edited by 14 May 2015, 16:52

          If it's just for you, maybe you can use mouse/keyboard macros? Some softwares could automate what you need

          25% off Skatter for SketchUcation Premium Members

          1 Reply Last reply Reply Quote 0
          • T Offline
            thomthom
            last edited by 14 May 2015, 19:31

            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-skylines-sketchup-tools/blob/master/src/tt_citites_skylines/exporters/fbx.rb

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • K Offline
              kaas
              last edited by 14 May 2015, 19:42

              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.

              1 Reply Last reply Reply Quote 0
              • D Offline
                Dan Rathbun
                last edited by 14 May 2015, 23:06

                @thomthom said:

                The other exporters where added before the COLLADA exporter - and never retrofitted with options. We have issue filed for this however.

                Yes that IS the WHY I was referring to...

                @thomthom said:

                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:

                I was thinking of doing the same thing.

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kaas
                  last edited by 16 Nov 2017, 06:56

                  Nice - in V18 the option hashes are added for several file formats.
                  http://ruby.sketchup.com/file.exporter_options.html

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement