THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/08/2012 at 12:15, xxxxxxxx wrote:
I was wondering if there is a way to get all objects? I need python to know the total amount of objects in a scene. Regardless of wether they are in a hierarchy or not. Is there a way to do that?
On 09/08/2012 at 12:36, xxxxxxxx wrote:
Yes, there is.
There are a lot of references for walking the hierarchy in the forum, the C++ documentation and I think also in the Python documentation.
The easiest way to travel through the hierarchy is using a recursive function (half recursive, half iterative actually). You can also iterate through the whole hierarchy without doing a recursive function-call.
On 09/08/2012 at 23:28, xxxxxxxx wrote:
This is a great article with source code showing how to traverse all the objects in a document:
On 09/08/2012 at 23:35, xxxxxxxx wrote:
Ah! Thanks a lot guys! That will do the trick!
On 02/10/2012 at 12:52, xxxxxxxx wrote:
This is what I needed too. Thank you PerAnders! Actually if I might, I am just getting started and the link above is of enormous help. For example, "How do I ???" would be a great thread or set of threads to get us newbies up and running. I figured out how to generate, assign, and change values of a texture before I actually found this about selecting objects in the OM. I am traversing the learning curve one sample at a time... ;-)