• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ 30% Off | Artisan 2 on sale until April 30th Buy Now

[Plugin] exportgroups2objs v1.1 20101010

Scheduled Pinned Locked Moved Plugins
22 Posts 8 Posters 12.5k 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.
  • T Offline
    TIG Moderator
    last edited by 10 Oct 2010, 11:44

    (c) TIG 2010
    Permission to use, copy, modify, and distribute this software for
    any purpose and without fee is hereby granted, provided that the above
    copyright notice appear in all copies.
    THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


    exportgroups2objs.rb >>> ../Plugins/ folder


    Purpose:
    It exports every 'visible' Group in the Model's entities as a separate OBJ
    file - 'visible' means it is not hidden and/or its layer is 'on'.
    A nested Group within a Component is not exported unless that Component
    Instance is itself within another Group that is in the Model's entities.
    A nested Group that is within another Group that itself is in the Model's
    entities will of course be included with the contents of the exported Group.


    Usage:
    To run the tool type 'exportgroups2objs' in the Ruby Console.
    If the Model SKP is new and has not yet been saved you will get an error.
    If there are no Groups to Export as OBJs you will get an error.
    All Groups are processed in turn - the OBJ file path in displayed in
    the Console.
    The paired OBJ/MTL files are exported into the Model's folder.
    The files' names are based on each Group's name with an incrementing suffix
    if there are more than one Group with that name - e.g.
    'Group_A_0001.obj'
    'Group_A_0002.obj'
    'Group_B_0001.obj'
    If the exported Group has no name then it is named 'Group__0001.obj' etc...
    On completion the total number of Groups exported as OBJs is reported.


    Donations:
    by PayPal to info @ revitrev.org PayPalButton ___________________________________________________________________________
    Version:
    1.0 20101010 First release.
    1.1 20101010 Disallowed characters in File_names from Group_names >> '_'.


    =endexportgroups2objs.rb

    TIG

    1 Reply Last reply Reply Quote 0
    • K Offline
      Khai
      last edited by 10 Oct 2010, 11:47

      ooooh thank you πŸ˜„

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 10 Oct 2010, 11:53

        Tips:
        Your Sketchup version needs to support OBJ export.
        The current options in the main OBJ export dialog will be used for each of the exported files [e.g. you might have Options > Units > 'meters', even when you are modeling in mm].

        TIG

        1 Reply Last reply Reply Quote 0
        • P Offline
          pilou
          last edited by 10 Oct 2010, 12:36

          Very useful for some purposes β˜€

          Frenchy Pilou
          Is beautiful that please without concept!
          My Little site :)

          1 Reply Last reply Reply Quote 0
          • T Offline
            tfdesign
            last edited by 10 Oct 2010, 12:46

            Heck TIG! You don't hang about!? What's your favourite blend of coffee?? 😲 πŸ˜‰

            Now we need a similar plug in for export of COLLADA files from different layers 😎

            regards,

            Tom

            My book "Let's SketchUp!" Download from here

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 10 Oct 2010, 14:38

              @tfdesign said:

              Heck TIG! You don't hang about!? What's your favourite blend of coffee?? 😲 πŸ˜‰
              Now we need a similar plug in for export of COLLADA files from different layers 😎
              regards,
              Tom

              That should be easy - give a bit more of an outline of what you want it to do and I could see what's possible...

              TIG

              1 Reply Last reply Reply Quote 0
              • T Offline
                TIG Moderator
                last edited by 10 Oct 2010, 15:29

                Here's v1.1 http://forums.sketchucation.com/viewtopic.php?p=278209#p278209
                Disallowed characters in File_names from Group_names >> '_'.

                TIG

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Krisidious
                  last edited by 10 Oct 2010, 16:33

                  I'm telling you he's a ROBOT! the man never sleeps.

                  By: Kristoff Rand
                  Home DesignerUnique House Plans

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    tfdesign
                    last edited by 10 Oct 2010, 21:53

                    @tig said:

                    That should be easy - give a bit more of an outline of what you want it to do and I could see what's possible...

                    TIG, sorry for the late reply.

                    I suppose to start, in a nutshell (!), the plugin should be able to handle both COLLADA/dae files as well as FBX (pro SU version)?

                    Once collections of groups (all also containing textures) are split into their own layers, each layer is saved, along with the layer's name, and the associated materials into their own folders. So for example if there are seven layers, then seven layers, each with their associated layer names are placed into a folder within a pre designated area (possibly a folder within the SketchUp skp documents, in the documents folder. I hope that last bit makes sense? I don't use Vista or Windows 7, so I don't know how Microsoft have structured the filing system). ie;

                    home/documents/sketchup/current project/layer name 1, layer name 2, layer name...n

                    There should also be an option present that allows for each group from each layer also to be placed into its own subfolder within the layer folder. ie;

                    home/documents/sketchup/current project/layer name a/group 1, group 2, group...n

                    This would be very useful for anyone using SU with say Unity for eg. who want to create entire sets in SketchUp, then transfer them to Unity (for 'ArchVis' or game development purposes).

                    Presently I'm only using the free version of SketchUp, so I don't have access to fbx export, but I have got Caffeinatedbits Sket2FBX converter, which works pretty well. I know currently that SketchUp's current COLLADA export can get a tad messy, i.e., it SU makes a dae file and a folder. It would be better if the dae file was also in the image/texture folder.

                    I think that kind of sums it up? If I have any other thoughts, I'll post them here in the week. Of course if anyone else who is also thinking along the same idea, please don't hesitate to add suggestions too. πŸ˜„

                    regards,

                    Tom

                    My book "Let's SketchUp!" Download from here

                    1 Reply Last reply Reply Quote 0
                    • McGyverM Offline
                      McGyver
                      last edited by 11 Oct 2010, 01:18

                      @tig said:

                      Tips:
                      Your Sketchup version needs to support OBJ export.
                      The current options in the main OBJ export dialog will be used for each of the exported files [e.g. you might have Options > Units > 'meters', even when you are modeling in mm].
                      I take it then that this will not work in the free version of SU6 or any version that the exporters have "timed out" in?

                      [Visit My ShareCG Freebie Gallery](http://www.ShareCG.com/pf/full_uploads.php?pf_user_name)

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        tfdesign
                        last edited by 11 Oct 2010, 09:46

                        @unknownuser said:

                        I take it then that this will not work in the free version of SU6 or any version that the exporters have "timed out" in?

                        @tig said:

                        Tips:
                        Your Sketchup version needs to support OBJ export.

                        I would imagine so? πŸ˜„

                        I know there is an OBJ exporter plugin (for the free version), so perhaps it can be done?

                        My book "Let's SketchUp!" Download from here

                        1 Reply Last reply Reply Quote 0
                        • McGyverM Offline
                          McGyver
                          last edited by 11 Oct 2010, 15:22

                          @tfdesign said:

                          @unknownuser said:

                          I take it then that this will not work in the free version of SU6 or any version that the exporters have "timed out" in?

                          @tig said:

                          Tips:
                          Your Sketchup version needs to support OBJ export.

                          I would imagine so? πŸ˜„

                          I know there is an OBJ exporter plugin (for the free version), so perhaps it can be done?
                          Thanks tfdesign, I just wanted to clarify that. There are two reasons that I asked that question, some people who are new to SU may reason that their version(5,6,7,8) does support object export, not realizing or understanding version also implies "free or pro" and if it is timed out, it no longer "currently" supports OBJ export,although the software version(#) once did. Stupid question I suppose, but maybe someone was wondering about that.
                          The other reason I asked that question is in another thread TIG had said that he was finishing up an OBJ exporter that would export materials and work with both the free version and pro and I was confused as to whether or not this was the one.
                          As far as other OBJ exporters for the free version go, none ever really worked well for me(maybe because I'm a Mac user) or does not export materials at all. It sucks being too poor to afford the pro version so I can properly export my models without "rationing" my dwindling(export) time on my SU 7 pro demo, while I do all my work on the free version of 6.

                          By the way- even though I was not able to use this plugin, thank you anyway TIG it sounds pretty cool and useful.

                          [Visit My ShareCG Freebie Gallery](http://www.ShareCG.com/pf/full_uploads.php?pf_user_name)

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            tfdesign
                            last edited by 11 Oct 2010, 15:29

                            @unknownuser said:

                            Thanks tfdesign

                            Just call me Tom. πŸ˜„

                            Do you have to export using OBJ? Could you not export using COLLADA? I think dae/fbx is a far superior format. Okay, people have found some issues, but I'm confident if more people adopt dae, things will improve more quickly. As long as your model isn't too big, you shouldn't really have any issues. πŸ˜„

                            Sket2fbx only costs a quid, and it works very well.

                            My book "Let's SketchUp!" Download from here

                            1 Reply Last reply Reply Quote 0
                            • McGyverM Offline
                              McGyver
                              last edited by 11 Oct 2010, 18:46

                              My main reason to export my models is to export to Poser 7. For my purposes I actually prefer exporting in 3DS format to use in Poser since it usually has less trouble with textures. Since there is no hope of anyone EVER making a 3DS export plugin for SU (well that works with Mac), when I run out of Pro export time I'm only left with DAE as an export option... which I'm still not clear if that is an accurate assumption either,as I've never had any answer to this question-when SU 7 pro times out does the DAE export option remain? with the ability to export textures too? and by that I mean "just like in the pro version" and not like in the"change the .kmz to .zip to get to the .dae files" method where the textures are exported, but have to be manually reapplied in whatever other program you use it in... If that is so, DAE is not SO bad... But then I have to use Blender to convert the DAE file to 3ds or obj so it can be used in Poser, since the version of Poser(7) that I have does not support .dae (well 7 "Pro" did... I think, but I just have plain ol' vanilla- 7). Even so I've had mixed results with using DAE convert files in Poser... I've had slightly better results with OBJ. I've even tried the su2objmtl2 plugin by TAK2HATA , but it does not work on a Mac. I think in the end the only real option is going to be to stop using SU and try and actually get used to working in Hexagon or Blender. I can't tell you how excited I got when someone told me that VUE can import SKP and there was a PLE for it.... Then I found out it only does that on PCs. Really, being a Mac user you kind of feel like a Leper sometimes...

                              [Visit My ShareCG Freebie Gallery](http://www.ShareCG.com/pf/full_uploads.php?pf_user_name)

                              1 Reply Last reply Reply Quote 0
                              • K Offline
                                Krisidious
                                last edited by 14 Oct 2010, 16:25

                                I'm using this to export a car model for game making... the car has most parts as groups and each must be exported to OBJ and then UVW mapped and converted into GMT file type. this is awesome.

                                take a look at how many groups I would have had to export and name each one accordingly.

                                groupstoobjs.jpg

                                instead... hit the command.

                                I gotta get a donation in this guys box soon.

                                thanks Tig.

                                By: Kristoff Rand
                                Home DesignerUnique House Plans

                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  TIG Moderator
                                  last edited by 31 Oct 2010, 12:56

                                  Here's an update reminder http://forums.sketchucation.com/viewtopic.php?p=278209#p278209

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • FBPrescherF Offline
                                    FBPrescher
                                    last edited by 21 Dec 2013, 13:37

                                    @tig said:

                                    Tips:
                                    Your Sketchup version needs to support OBJ export.
                                    The current options in the main OBJ export dialog will be used for each of the exported files [e.g. you might have Options > Units > 'meters', even when you are modeling in mm].

                                    this is great. but... how do i use this back into another sketchup project. i can not open the obj file.

                                    Trimbling Addiction can be a Good Thing!

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      TIG Moderator
                                      last edited by 21 Dec 2013, 14:23

                                      @fbprescher said:

                                      @tig said:

                                      Tips:
                                      Your Sketchup version needs to support OBJ export.
                                      The current options in the main OBJ export dialog will be used for each of the exported files [e.g. you might have Options > Units > 'meters', even when you are modeling in mm].

                                      this is great. but... how do i use this back into another sketchup project. i can not open the obj file.
                                      Why are you exporting as OBJ ?
                                      If you want to export groups as separate SKPs, then there's a ...2skp version.

                                      If you have any OBJ you'd like to import into your SKP, then there's on OBJimporter available...

                                      Please explain your workflow and issue more clearly...

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • FBPrescherF Offline
                                        FBPrescher
                                        last edited by 21 Dec 2013, 14:43

                                        @tig said:

                                        @fbprescher said:

                                        @tig said:

                                        Tips:
                                        Your Sketchup version needs to support OBJ export.
                                        The current options in the main OBJ export dialog will be used for each of the exported files [e.g. you might have Options > Units > 'meters', even when you are modeling in mm].

                                        this is great. but... how do i use this back into another sketchup project. i can not open the obj file.
                                        Why are you exporting as OBJ ?
                                        If you want to export groups as separate SKPs, then there's a ...2skp version.

                                        If you have any OBJ you'd like to import into your SKP, then there's on OBJimporter available...

                                        Please explain your workflow and issue more clearly...

                                        I've been designing RV (my occupation) and have used sketchup to lay out cabinets. these cabinets are custom to each coach. as I design I find cabinets or special features I would use in the future on other projects and would like to extract them for future inserts. I 'm trying to get away from redesigning the wheel each time.

                                        Trimbling Addiction can be a Good Thing!

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          TIG Moderator
                                          last edited by 21 Dec 2013, 16:24

                                          If you make your 'cabinets' etc as components [rather than groups] in any model, then you can simply export the model's components into a 'collection' - there's popout menu in the Components Browser... or use the context-menu Save_as for individual ones. These are saved as separate SKP files.

                                          Provided that the 'collection' folder is one of the folders available in the Components Browser you can then reuse these items in any other model...
                                          There is no need for using Plugins for this - just a good understanding of how SketchUp's components etc work...

                                          Incidentally, Materials are similar - in that once you've got custom Materials in a model you can save them as a collection of SKMs that can be reused in future models too...

                                          TIG

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

                                          Advertisement