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

    Find Objects by Type ?

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 452 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 05/05/2011 at 02:54, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi...
      Is there a possibility to find objects by type in coffee (11.5) ?

      Doc->FindObjects("Name") doesnt help at all, bc i cant be sure of the cameras name.

      the SDK says that there can be given a Marker instead of the Name
      but I cant find Examples of this. I guess a Marker is not an Object Type anyway.

      so is there a possibility to get a list of all cameras, without crawling through the full object list?

      and add something more...
      what i effectively need is to find a tag (which is only on cameras)
      but i guess there is no possibility to find coffee tags with certain names directly
      my way would be to find all the cameras, and then to crawl through their tags

      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 05/05/2011 at 07:16, xxxxxxxx wrote:

        Hi,

        There's several examples of finding things (including tags) by type, name, etc. in this:
        https://sites.google.com/site/scottayersmedia/CoffeeBible_Updated11-13-10.zip

        -ScottA

        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 05/05/2011 at 07:30, xxxxxxxx wrote:

          hm thanks... good resource

          but didnt help me w the problem.
          i already implemented the crawling / iterator version
          if sbdy knows a shortcut it would be highly apreciated

          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 06/05/2011 at 06:13, xxxxxxxx wrote:

            Yes, you have to iterate through the full hierachy to filter objects, tags etc.

            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 06/05/2011 at 08:43, xxxxxxxx wrote:

              Walk(op) {  
                if (!op) { return null; }  
                if (op->GetDown()) { return op->GetNext(); }  
                while (!op->GetNext() && op->GetUp()) {  
                    op = op->GetUp();  
                }  
                return op->GetNext();  
              }  
                
              main(doc,op) {  
                while (op->GetType() != cameraID) {  
                    op = Walk(op);  
                }  
                println(op->GetName());  
              }
              

              Can't test that code yet, I'm not at home. But it should work.
              (of course cameraID is not a already given variable)

              Cheers, nux

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