[Plugin] Make Unique Selected Components v0.4 20110803
-
All components are instances of their definition.
All groups are instances of their definition.
Even all images are an instance of their definition.So a 'definition' can be a '.group?' or '.image?'... or more usually a plain olde 'component'.
Only 'components' appear in the Component Browser...Groups are usually expected to be a single instance of their definition.
Sometimes it's possible to have more than one group referring to the same definition - either by copying a group with no subsequent editing or by 'code'.
So then the group's definition has multiple instances, just like a regular component could.
Any code that makes a group into a component [that then appears in the Component Browser] does so irrespective of how many instances of it there are... this is because e.g. the 'group.to_component' code makes that one group's definition into a plain-component definition, and thereby that group converts into an instance of it [and the definition then appears in the Component Browser]... and therefore if there are any other groups referring to that same definition then these are also made into instances of that plain-component definition too... -
Hello! Is there any possibility to preserve a connection between sub-leveled components inside of selection?
-
@dem Yes, with Eneroth Deep Make Unique, but works only for components, if you want the same thing for groups... there is a much more complicated process...
-
@FlorinAp
Doesn't Dezmo's code do this ?
https://forums.sketchup.com/t/make-unique-separate-groups/160741/14 -
@TIG No, Dezmo's code makes everything unique (one single instance for each object), but this is what I asked him for.
Eneroth extension is the only one that does what logically it is supposed to do in this command - no matter the number of nested levels, no matter the type of objects (groups or components - yes, I made a mistake in the previous reply.!), whatever you select, Eneroth unlinks all of them from the rest of the model, but keeps all the relations between them in your selection, with the same structure of nesting.
I mean the same thing that SU does when you select some non-nested components and make them unique, but it is doing the same thing in whatever nested combination of groups and components. All other extensions that pretend to do this... just create a mess in your nested structure, especially if you mix them up (components inside groups...).I asked to Dezmo for one command that breaks everything (groups) to the last object because I couldn't find anything reliable, I mean the only one reliable is 3DS House extension, but that one requires internet to open its UI, and sometimes I'm in places that for short periods I don't have internet.
I hope Dezmo (or somebody else) can do the Families selection also for groups, because mine works only for components; that one I found it on VBO Facebook page.
-
@FlorinAp
That code leaves a lot to be desired,
Please explain how you want to use the code to select and change groups by matches or layer etc...
I think it's much easier than you expect... -
@TIG Right now it has 4 options (Select all; Select Active; Select Active from same Layer; Select all from same Layer), right now I don't see the need for a fifth option.
I don't know if it can be combined in menus/submenus for groups and components, so it better has a different name (e.g. Families Group instances...) in order to eliminate confusion with the one for components.
Thank you.!
-
@FlorinAp
Sorry, but you are not explaining this at all well.Select All = what ? - e.g. All Groups in the model
Select Active = what ? - e.g. Groups in the active context
Select Active... ? - e.g. Groups in the active context, with the same tag/layer
Select All... ? - e.g. All Groups in the model, with the same tag/layerWhat do you do with the selection etc ?
Changing a selection of entities across will cause crashes etc...The menus and naming are secondary - we need clarity on what it is you hope to achieve.
-
@TIG This ruby has the purpose of recognizing and selecting all the instances of components (even if there are one or more that have been made unique) - it just recognizes all the instances (unique and not unique), that is why it is called "families".
So all the options that appear in its submenu, apply to selected components even if there is at least one that has been made unique.
What I do with the selection... it is up to me after that.
-
Now I understand better.
My main point was that if there are instances of the same component in different contexts they get added to the selection and manipulating a selection spanning contexts can lead to crashes...
-
@TIG Yes, i know that, and I've seen it, but so far nothing bad if you try and manipulate them locally, without changing the geometry (change the properties or colors of the edges and faces, delete them, and sometimes even replace them with TT Component Replacer which also can manipulate groups - you copy in one context the new sample, select all those that you're interested in, and replace, then delete the sample..., this one from TT works across contexts because it doesn't change the geometry and doesn't care about groups and components, it recognizes the bounding boxes and works in those boundaries).
-
@FlorinAp
Don't manipulate the selection directly.
Instead make it an array first...
This will guard against crashes somewhat...selection_to_change = selection.to_a
Advertisement