find all cameras C.O.F.F.E.E



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

    On 18/01/2009 at 10:14, xxxxxxxx wrote:

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

    ---------
    Hello!

    I need to find all cameras in a scene ? Include all parents list. how can I to do?



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

    On 18/01/2009 at 10:50, xxxxxxxx wrote:

    Here is an example that browses through the entire object hierachy. Basically you browse with GetDown(), GetUp()and GetNext(), GetPrev(). Check with GetType for the object's type.

    > \> Recursive(camera) \> { \>      while(camera) \>      { \>           if(camera->GetType() == Ocamera)     //check if it is a camera \>           { \>                //do something with camera \>                println(camera->GetName());     //prints the name of the camera \> \>                var parent = camera->GetUp(); \>                if(parent) \>                { \>                     //parent is the cameras parent \>                     //do something with parent \>                     println(parent->GetName());     //prints the name of the camera's parent \>                } \>           } \> \>           Recursive(camera->GetDown()); \> \>           camera = camera->GetNext(); \>      } \> } \> \> main(doc,op) \> { \>      Recursive(doc->GetFirstObject()); \> } \>

    cheers,
    Matthias



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

    On 18/01/2009 at 14:35, xxxxxxxx wrote:

    Thank you!!!


Log in to reply