Find Objects by Type ?

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

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

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

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

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