ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Submitted by artrender.info on Tue, 2013-06-18 16:13
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?
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!
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.
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?
Comments
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!
:) 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. :)
Tools and Scripts for Autodesk 3dsMax
...
Good night. Tomorrow will continue.
I think Mike already asleep :)
bga
...
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.
bga
Why not define childrens
Why not define childrens before ungrouping
let say we have selected rootGroup which contains two more groups inside.
bga
...
Again you are faster :) Second time this day.
bga
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?
Tools and Scripts for Autodesk 3dsMax