Hi Matthias, > Hello Antonio, > > do you want to collect only all materials within a subgraph, or do want > them to be unique (maybe these materials are used elsewhere within the > scene ?) > > Collecting materials is easy, simply write a traversal that collects all > materials of a geometry and materialgroup. There should be examples how > to write a traversal.
Yes, I wrote a traversal which pushes back all materials I encounter during the traversal. Before I add the material to the list I check if it's already in there... I though this was not the most elegant way and is of complexity O(n^2)... But as n is very small in most cases, this works quite well for me. Regards, Toni _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users