Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Get index from iterator

1 ANTWORT 1
GELÖST
Antworten
Nachricht 1 von 2
AaronWPowell
144 Aufrufe, 1 Antwort

Get index from iterator

If I'm looping through an Arnold iterator object, is there a way to get the index of the object I'm currently operating on? Or do I need to track a separate variable like this:

 

int index = 0;
while (AiOutputIteratorGetNext(iterator, NULL, NULL, NULL))
{
    // Do some work, then
    index++;
}
1 ANTWORT 1
Nachricht 2 von 2
thiago.ize
als Antwort auf: AaronWPowell

No, because there's no guarantee the underlying container can even be indexed into. For instance, it could be storing the objects in a map instead of an array.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report