Exploding question

Hi everyone,
I have a question if there is a way to expolde nested components one level down only if it is made of components and when it is component that contains only geometry and group than it stays unexploded ?
something like the op_flatten hierarchy plugin but the plugin also exoldes nested groups component.
any help would be appreciated.
Thank you Miroslav

It’s relatively straightforward…

The container.explode operation returns an array of the entities it results in.

Write a method that can be iterated…

Use it to explode the ‘container’ by passing a reference.
You then grep the returned array to collect any previously nested groups and component-instances, then pass those back into the method as an argument… and repeat until the grepped array is finally empty…

Try this …

BuzikMiroslav_ExplodeNested-1.0.0.rbz (6.8 KB)

Your post wasn’t clear on what to apply the “component only” test, so I made 2 commands.

  • If the selected component has only components you can explode all nested components (regardless of what kind of entities these nested components have.).

  • You can explode ALL “component only” nested components of a selected component, but leave the selected component’s groups, primitive geometry and nested components containing non-component entities as is.

:laughing: I translated your nickname and got a laugh (popok sveta = “the navel of the world”)

thanks @DanRathbun I will check it out. This morning i actually woke up with a brain storm and manage to modify the op_flatten hierarchy and got what a needed. I know I shouldnd do it but I will use for my own purposes. I even tried to contact the author but no respond from him.

:grin: yeah when I was 16 years old I thought I am the navel of the world. meaning that I can do anything I want easy. now iam 40 and it makes me smile.