group child

I have a group, I ungroup it and I want to assign a variable to it's children!

groupchildren = #()
 
groupchildren = ungroup o!
 
I know this way:
 
select o
ungroup o
groupchildren = selection
 
But how to access ungrouped children without select? 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
artrender.info's picture

yes, barigazy!

Thank you both for your answers! I've noticed that if you make ungroup inside script, then there is no undo for the operation - it's searching for deleted object, but I've solved it already another way!

miauu's picture

:) Most important is the OP

:)
Most important is the OP to get some help. :)
So, I leave it to you. I will go to the bed. :)

barigazy's picture

...

Good night. Tomorrow will continue.
I think Mike already asleep :)

barigazy

barigazy's picture

...

Hey Mike I noticed that you like to ask "after midnight" tough questions. :)
Advantage ei magic of MXS is that you are able to do some object operation without selecting any.

barigazy

barigazy's picture

Why not define childrens

Why not define childrens before ungrouping
let say we have selected rootGroup which contains two more groups inside.

rootGroup = $Group003
groupChildrens = deleteitem (join #() rootGroup) 1
undroup rootGroup

barigazy

barigazy's picture

...

Again you are faster :) Second time this day.

barigazy

miauu's picture

Get all objects in the group

Get all objects in the group before to ungroup it.
Ungroup the group.
The objects are the same as when they are grouped, so you can access each object without selecting.

What type of variable do you want to assign? And why you can assign this variable only when toe object is selected?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.