Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Specific Type in scene?

    SDK Help
    0
    3
    278
    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
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 24/07/2003 at 06:32, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      What is the fastest way to get a list of objects of a specific type in the current scene?
      I am currently using GetHighest() and then go through all objects in the scene and grab the specific objects. Is there a faster way?
      Thanks!
      Best
      Samir

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 25/07/2003 at 11:21, xxxxxxxx wrote:

        Since the objects aren't indexed in any way, I think the theoretical complexity is linear in the number of objects. So just going through each object in the scene would be the fastest way. (I don't think the actual algorithm used will affect the complexity, though it could be that a recursive search is more efficient since it doesn't need to walk upwards.)
        I assume that you have verified this as a bottle neck in your plugin. (Otherwise you have committed the sin of premature optimization... 😉 But I think you're out of luck if that's so. What kind of plugin is this btw?

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 25/07/2003 at 13:48, xxxxxxxx wrote:

          Since the objects aren't indexed in any way, I think the theoretical complexity is linear in the number of objects. So just going through each object in the scene would be the fastest way. (I don't think the actual algorithm used will affect the complexity, though it could be that a recursive search is more efficient since it doesn't need to walk upwards.)
          ********
          Yes, I do have a recursive function in use right now...
          ********
          I assume that you have verified this as a bottle neck in your plugin. (Otherwise you have committed the sin of premature optimization... 😉
          **********
          Hehe, no I haven´t and it´s actually really fast enough. Haven´t thought it would be so I guessed maybe there´d be a function I have overseen in the SDK like FindObjectType or something 🙂
          **********
          But I think you're out of luck if that's so. What kind of plugin is this btw?
          **********
          For sale promotional reasons I won´t go into details if you understand ;)) I need to find all cameras in a scene so I can list them. See my conf in fc for details 🙂
          Thank you!!
          Best
          Samir

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