you did exactly what i described. you used a common index for both loops (you just
took the extra step to store the result of the first loop in a list). what you were trying
in xpresso is logically impossible. you did more or less this:
for A in list0:
r0 = A
for B in list1:
r1 = B
x = r0 + r1
both loops run indepently and therefore cannot access the others loop iteration steps.
the given example would just add the last member of both lists.
you have to understand that the tagnode can behave like an iterator. it does work
like baseobject.gettags(), it returns a list of tags matching your filter. when you have
only one texture tag it does not work as an iterator anymore and just returns one tag.
i described both possible solutions in my first posting, not sure how i could be more clear
- nested loops -> xgroup, feed xgroup with the result of an iterator.
for n in foo:
for m in bar:
yield n + m
edit : here an example, note that the xgroup is actually not necessary, but it helps a lot
to keep the parts separated so that you do not mix up the different loops (which will
fail the parsing of your graphview tree).
- use a common index like in your example
for commonindex in xrange(a,b):
n = list0[commonindex]
m = list1[commonindex]
yield n + m