loocas
04-24-2008, 01:09 PM
Hi there,
I've bumped into a, I believe a trivial, problem. I cannot find a way to loop through object's hierarchy in a script.
I mean, when I call the path this way: $objName/* to find direct children of the "objName" object, it all works, however, when assigning the obj to a variable, let's say "tmp" it doesn't work: tmp = $selection; tmp/* it either hangs the script or prints "OK".
Where's the problem?
The thing is, I need to write some code that goes through selection in a hierarchical manner and I thought (at first) that the pathnames might be of some help. I can loop through ".children" property of the objects, but if you have any better ideas, I'd be very glad to hear them ;)
Thanks in advance, cheers,
- loocas
I've bumped into a, I believe a trivial, problem. I cannot find a way to loop through object's hierarchy in a script.
I mean, when I call the path this way: $objName/* to find direct children of the "objName" object, it all works, however, when assigning the obj to a variable, let's say "tmp" it doesn't work: tmp = $selection; tmp/* it either hangs the script or prints "OK".
Where's the problem?
The thing is, I need to write some code that goes through selection in a hierarchical manner and I thought (at first) that the pathnames might be of some help. I can loop through ".children" property of the objects, but if you have any better ideas, I'd be very glad to hear them ;)
Thanks in advance, cheers,
- loocas
