[Plugin] exportgroups2objs v1.1 20101010

[Plugin] exportgroups2objs v1.1 20101010

Postby TIG » Sun Oct 10, 2010 12:44 pm

(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
___________________________________________________________________________
Version:
1.0 20101010 First release.
1.1 20101010 Disallowed characters in File_names from Group_names >> '_'.
___________________________________________________________________________
=end
exportgroups2objs.rb
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] exportgroups2objs

Postby Khai » Sun Oct 10, 2010 12:47 pm

ooooh thank you :)
0

Khai 
 

Re: [Plugin] exportgroups2objs

Postby TIG » Sun Oct 10, 2010 12:53 pm

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].
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] exportgroups2objs

Postby pilou » Sun Oct 10, 2010 1:36 pm

Very useful for some purposes :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] exportgroups2objs

Postby tfdesign » Sun Oct 10, 2010 1:46 pm

Heck TIG! You don't hang about!? What's your favourite blend of coffee?? :shock: ;)

Now we need a similar plug in for export of COLLADA files from different layers 8-)

regards,

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

tfdesign 
Top SketchUcator
 

Re: [Plugin] exportgroups2objs

Postby TIG » Sun Oct 10, 2010 3:38 pm

tfdesign wrote:Heck TIG! You don't hang about!? What's your favourite blend of coffee?? :shock: ;)
Now we need a similar plug in for export of COLLADA files from different layers 8-)
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...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] exportgroups2objs v1.1

Postby TIG » Sun Oct 10, 2010 4:29 pm

Here's v1.1 viewtopic.php?p=278209#p278209
Disallowed characters in File_names from Group_names >> '_'.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] exportgroups2objs v1.1

Postby Krisidious » Sun Oct 10, 2010 5:33 pm

I'm telling you he's a ROBOT! the man never sleeps.
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] exportgroups2objs v1.1

Postby tfdesign » Sun Oct 10, 2010 10:53 pm

TIG wrote: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
0
My book "Let's SketchUp!" Download from here

tfdesign 
Top SketchUcator
 

Re: [Plugin] exportgroups2objs

Postby McGyver » Mon Oct 11, 2010 2:18 am

TIG wrote: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?
0
User avatar
McGyver 
 

Re: [Plugin] exportgroups2objs

Postby tfdesign » Mon Oct 11, 2010 10:46 am

McGyver wrote: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 wrote: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?
0
My book "Let's SketchUp!" Download from here

tfdesign 
Top SketchUcator
 

Re: [Plugin] exportgroups2objs

Postby McGyver » Mon Oct 11, 2010 4:22 pm

tfdesign wrote:
McGyver wrote: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 wrote: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.
0
User avatar
McGyver 
 

Re: [Plugin] exportgroups2objs

Postby tfdesign » Mon Oct 11, 2010 4:29 pm

McGyver wrote:Thanks tfdesign


Just call me Tom. :D

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.
0
My book "Let's SketchUp!" Download from here

tfdesign 
Top SketchUcator
 

Re: [Plugin] exportgroups2objs v1.1 20101010

Postby McGyver » Mon Oct 11, 2010 7:46 pm

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...
0
User avatar
McGyver 
 

Re: [Plugin] exportgroups2objs v1.1 20101010

Postby Krisidious » Thu Oct 14, 2010 5:25 pm

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.
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] exportgroups2objs v1.1 20101010

Postby TIG » Sun Oct 31, 2010 1:56 pm

Here's an update reminder viewtopic.php?p=278209#p278209
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] exportgroups2objs

Postby FBPrescher » Sat Dec 21, 2013 2:37 pm

TIG wrote: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.
0
User avatar
FBPrescher 
 

Re: [Plugin] exportgroups2objs

Postby TIG » Sat Dec 21, 2013 3:23 pm

FBPrescher wrote:
TIG wrote: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...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] exportgroups2objs

Postby FBPrescher » Sat Dec 21, 2013 3:43 pm

TIG wrote:
FBPrescher wrote:
TIG wrote: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.
0
User avatar
FBPrescher 
 

Re: [Plugin] exportgroups2objs v1.1 20101010

Postby TIG » Sat Dec 21, 2013 5:24 pm

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...
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

cron

Who is online

Users browsing this forum: roltsi89, Viviane Reis and 14 guests

Visit our sponsors: