ScriptSpot

Forum topic · General Scripting

group child

By artrender.info · 2013-06-18

Description

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 (7)

yes, barigazy!

artrender.info · 2013-06-20

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 · 2013-06-18

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

barigazy · 2013-06-19

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

barigazy · 2013-06-19

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 · 2013-06-18

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 · 2013-06-18

Again you are faster :) Second time this day.

miauu · 2013-06-18

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?