Group -> Make Component Discards Group Name
-
It is very annoying when you use Make Component on a Group, that SU discards the Group name and uses some generic Group#1 as the Component name.
-
A definition has a name, an instance has a separate potentially unconnected name.
Thus a component can be represented by two names - the minimum is the definition name.
A group is just a special kind of component and its definition always has the incrementing name 'Group#1' etc, its instance [which should be the only one as groups are meant to be unique] can have separate name - just like a 'normal' instance - by default it's blank, ''. The Outliner shows its actual name OR if '' as 'Group' by default - when it could show Box=Group#1, =Group#2 etc, something like it does for a Component xxx<yyy>.
When you change a group into a component it uses the group's definition name and not its instance name - potentially you can have several groups with instances of the same name [they are all '' by default anyway!] if it did take the instance name to use for the name of the component definition you could get #99 quite easily.It's not so much a bug BUT something that could be 'fixed'...
At the moment all it does is shift the type of definition from 'group' to 'component' - keeping the name as it was - i.e. the 'definition name'...
If you name a group [i.e. the instance] the definition name could change to match it.
That way making it into a component can use the displayed group name, perhaps with a #nn suffix if the name is duplicated. An unnamed group simply gets a 'Component#nn' name like when you make a component manually.
The group.make_component() method could be rewritten to do the naming of the new definition from the group.name - e.g. 'Box' or use 'Component#1' otherwise if name=='' [this will auto-increment]. Because a new component doesn't get a 'named instance' logically the new instance of the component that's just been made from the group should also be 'unnamed' and only its definition named... -
@TIG:
This is an interesting revelation for me. I was always thinking that a group was the first step to a component, not the other way around. But what you say makes sense. Things are not always what they appear to be
Advertisement