Hi!
Is it possible to update objects iterating on a group? For example let's say I have a group made of x cubes. I want to iterate and move each one up let's say 10*(index in group), so that the 1st one stays where it is, and the other one goes up 10, and so on...
I looked around and I see you can iterate through group data (get data on a group's property does seem to return an array) but I am not sure how to set back the global matrix for each individual cube. Is their a way to get an object in a group using an index for example?
The idea is that I can add or remove any number of objects from the group, and no change is needed on the ICE Tree.
Any idea?
Thanks!
Claude
Iterating over Group and set data
-
claudevervoort
- Posts: 89
- Joined: 16 Oct 2009, 00:56
- Location: Montréal, QC, Canada
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: Iterating over Group and set data
I don't know of any way to set data on each individual member of the group. I've seen this question on several forums and mailing lists, with no solution.
If only we could store a reference in an attribute, or convert from a string (the object name) to a reference.
The approach I was trying was to put an ICE tree on each object in the group, and put the object name in an attribute.
If only we could store a reference in an attribute, or convert from a string (the object name) to a reference.
The approach I was trying was to put an ICE tree on each object in the group, and put the object name in an attribute.
-
claudevervoort
- Posts: 89
- Joined: 16 Oct 2009, 00:56
- Location: Montréal, QC, Canada
Re: Iterating over Group and set data
Hmm that's unfortunate, but thanks for the feedback! At least I know there is not something obvious I am missing (I did try to store a reference as an attribute too, too bad it indeed complains of a mismatch
).
Claude
Claude
-
CiaranM
- Posts: 87
- Joined: 08 Jun 2009, 23:37
- Location: London
Re: Iterating over Group and set data
Yeah, string conversion would be really cool. Another possible great feature would be if we could read group membership data for each object. So, it would be easy to know which array element needed to be pulled.
Even better if we could just write directly on groups and circumvent entirely the need for ICE trees on each effected object.
As it is, I think the only way to do this is to store a unique ordered attribute on each object, and use that as a key to sort the group data and pull the result onto each object. Kind of a lame workaround.
Even better if we could just write directly on groups and circumvent entirely the need for ICE trees on each effected object.
As it is, I think the only way to do this is to store a unique ordered attribute on each object, and use that as a key to sort the group data and pull the result onto each object. Kind of a lame workaround.