Grouping objects

Next
 From:  Peter S (PETERSAAL)
7327.1 
Hi Michael -

New customer here and first have to thank you for making MoI. It's a wonderful program.

I searched on the forum and found some mention of adding the ability to group objects, but can't find a command to do it. I realize that it's not a trivial feature. Have you built it yet?

Peter
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7327.2 In reply to 7327.1 
Hi Peter, there isn't exactly a grouping feature in MoI as of yet although there is a kind of related thing which is object names.

If you select a bunch of objects and assign them all the same name (click on the name line in the object properties panel in the upper right corner of the main window), then they will be kind of grouped together in that there will be a single name entry for them under the Scene Browser's "Objects" section and you can then use the controls on the scene browser to work on all those objects with one click like hide/show them or select them all at once, etc...

There isn't a way to make them all get selected when you just click on one of them inside the modeling window though, that kind of grouping is something that I definitely want to add in the future but it is not in there as of yet.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  hairykiwi
7327.3 
Hi Peter,

The Match Object Name (V2) script made by Michael a few years back may be of help. (I've been using it ever since.)
http://moi3d.com/forum/messages.php?webtag=MOI&msg=3375.1

It's also available on http://kyticka.webzdarma.cz/3d/moi/ - and copied here:

MatchObjectNameV2 – the script works purely off of selection – to use it you must make a combined selection that includes at least one of the objects that already has the name assigned to it, along with other unnamed objects that you want to have assigned to that same name.
When you have a selection set up like that, then push the shortcut key and it will assign the unnamed objects to have that same name.
You can use the Scene browser to help you make the selection – right click on the object name in the scene browser to make it the "isolated selection" – everything else will get deselected and only those named objects will be selected. Then select the unnamed objects and then push the shortcut key.

code:
script: /* Match object name */ var name = ''; var objects = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.selected && obj.name != '' ) { name = obj.name; break; } } if ( name != '' ) { for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.selected && obj.name == '' ) { obj.name = name; obj.selected = false; obj.selected = true; } } }


Cheers,
Hamish
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Peter S (PETERSAAL)
7327.4 
Hi Michael and Hamish, thanks for your replies. To be more specific, the feature would enable nesting of named objects into named groups, to support the creation of a tree with an assembly, subassemblies and parts, similar to how SketchUp does nesting of components and groups in Outliner. My application is for industrial design, exporting the Moi files as OBJs for a WebGL viewer, where we want to persist the assembly tree. Maybe there's a way to do that with MoI as it is?

Cheers,
-p
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7327.5 In reply to 7327.4 
Hi Peter, sorry no there is not any way to do a hierarchical organization like that currently. That's definitely something that I want to add in the future and I expect to work on both a grouping and an instancing mechanism to do that type of thing.

Currently the main way you can organize things is by applying object names and assigning styles.


> exporting the Moi files as OBJs for a WebGL viewer, where we
> want to persist the assembly tree.

OBJ format does not have any mechanism in it for making a parent/child hierarchy in it for groups so this would probably not really work anyway with this particular format.

Both object names and style assignments do come through currently into OBJ exports though, the style assignments become material assignments in the OBJ file and the styles list becomes the materials list.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Peter S (PETERSAAL)
7327.6 In reply to 7327.5 
Thank you Michael for the detailed reply. +1 for grouping.

Again I have to say the more I use MoI the more I appreciate the way it works. It's really elegant.

Thanks also for the comment about OBJ, I was doubting whether it could support parent-child relationships.

If anyone out there has suggestions for a good MoI > WebGL workflow, any advice is appreciated. :-)

Cheers,
-p
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Christopher (SCHARDT)
7327.7 
I'm another new, and very enthusiastic user! I'd like to to register a very strong +1 for groups. In fact, not having groups is a pretty serious problem for me. I've read how to get group-like behavior with Object Names, but it doesn't do the trick for this case:

In the piece I'm working on, I need to be able to create a large number of objects, and then duplicate them 5x in a circular array. MOI is great at this, but there's a huge workflow problem: I can select all the original objects to be duplicated and give them the same Name. But after duplication ALL the duplicates will have that name too. Very often, I'll want to make these duplicates and look at the result. If I find a problem, I need to be able to quickly delete the duplicates and edit the original objects. Right now, I'm doing this with Undo, but what if I decide I need to do this next week! I would have to manually select all 5xN duplicate objects, then delete them. Box-selection can help, but it often misses objects or selects undesired ones.

So please Michael, make Groups a priority if you can! :-)

I would recommend that the functionality for this feature be like that in many other CAD/drawing programs:
1) Once grouped, clicking on an object shows a box around the entire group.
2) Double-click a group to edit inside the group.
3) Provide an Un-Group command.
4) Allow nested groups.
5) Provide an option that controls whether or not to hide the all objects outside a group while the group is edited.

Lastly, though it would be very nice to have what Sketchup calls "components" and others call "instancing", and though this is closely related to groups, I would strongly recommend getting Groups done and released ASAP, and let "instancing" wait. It will have some complicated UI issues to solve. Please don't let it hold up Groups!

Thanks!
Christopher
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Christopher (SCHARDT)
7327.8 In reply to 7327.7 
Michael, any word on when Groups will exist in MOI? It's a serous workflow challenge for me. Knowing whether or not we'll have Groups soon will determine whether I will use MOI for some upcoming work. Thanks!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
7327.9 In reply to 7327.8 
Hi Christopher,

> Michael, any word on when Groups will exist in MOI?

Sorry I have no specific target date set yet for when Groups will be implemented. I expect it will take quite a bit of work so it's not likely to be in the very immediate future. I would like to have it sometime before v4 is finished though.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All