Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    GetAllObjects()?

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 533 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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... 😉

              1 Reply Last reply Reply Quote 0
              • First post
                Last post