Getting all occurrences of a specific object type
-
On 15/06/2013 at 04:37, xxxxxxxx wrote:
Hi,
I'm trying to get all occurrences of a specific object type in a document. Specifically, it's a type that is part of a custom shader (a texture object). Just looping of the shader's channels is not enough, because theoretically it could be layers upon layers of objects (through links) where this object type may or may not be used.
Instead of looping through every possible branch, is there a simple way to just give me a list of "GetAllObjectsOfTypeInDocument(int type)" thing?
-
On 15/06/2013 at 05:56, xxxxxxxx wrote:
You can iterate over all shaders in a material just like you would iterate over the tree in the OM. Append the objects you need to a list and you're done.
-Nik