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
    • Recent
    • Tags
    • Users
    • Login

    Iterate Through All Objects In Scene

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 247 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 06/12/2010 at 11:10, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hi All,

      I am trying to use COFFEE to scan all the objects in the scene.
      I want to examine each object's name and if a match, then operate on it.
      The operation is to Add a TAG to the object if the TAG is not present.

      Is this possible in COFFEE node of expresso?

      If so, what would the code look like?

      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 07/12/2010 at 02:51, xxxxxxxx wrote:

        It's quite easy to do with a recursive function call.

        Example code browsing through all objects and printing the name of each object.

          
        BrowseScene(op)  
        {  
          while (op)  
          {  
              println(op->GetName());    //prints the object's name  
          
              BrowseScene(op->GetDown());    //recusive call of BrowseScene  
          
              op = op->GetNext();  
          }  
        }  
          
        main(doc,op)  
        {  
          BrowseScene(doc->GetFirstObject());  
        }  
        

        cheers,
        Matthias

        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 07/12/2010 at 06:17, xxxxxxxx wrote:

          Thank you , Matthias.

          So how would I make use of this in a COFFEE node? For instance, what if I want to output all the objects into a list so other xpresso nodes can process them?

          Is this practical, or is it best to just remain inside the COFFEE node and try to write one massive process?

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