|
I’m trying to optimise a compound for evenly spacing particles along a curve using several of Phil Taylor’s algorithms (http://www.exch.demon.co.uk/xsi/files/new/new.html) but I’m getting confused by the execution sequence if you use repeat loops and conditionals.
I’ve set up a dummy compound which simply splices one list into another but maintains the sort order. In the compound you have a master repeat loop which iterates over the items ‘to-be-spliced-in’ and a nested repeat which iterates over all the elements in the target array until it finds the correct insertion point (using a conditional). At this point the item is inserted into the array since the conditional is true and the array is set using Set Data. The iteration continues over the rest of the target array and then back up to the master loop to pick the next item for splicing. However, without an ‘additional’ Set Data on the resulting array the data from the previous iteration is lost.
Anyone have any ideas why this is?
The scene with the list insertion compound with comments at the relevant points is here:
http://www.exch.demon.co.uk/xsi/files/list_insert.rar
|
|
|