GetAllObjects()?
-
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:
Hey all,
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?
Greets!
Hans Willem -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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.-Niklas
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/08/2012 at 23:28, xxxxxxxx wrote:
Hi Hans,
This is a great article with source code showing how to traverse all the objects in a document:
http://www.peranders.com/w/index.php?title=Python_Object_Iteration -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/08/2012 at 23:35, xxxxxxxx wrote:
Ah! Thanks a lot guys! That will do the trick!
Greets,
Hans Willem -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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...