ObjectExist function



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

    On 14/05/2004 at 04:02, xxxxxxxx wrote:

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

    ---------
    Hi.
    I have written a function in COFFEE to check that a object really exist in the current document(dont a "ghost" object).
    Is this function needed in C++?

    Code of coffee function:

    // *****************************************************************************
    // Test, if the object realy exist or not in the current document
    // Input:
    //           objMain: object to test
    // Output:
    //           bool: TRUE, if the object found, else FALSE
    // *****************************************************************************
    boObjectExist (objMain)
    {
         var docMain;
         if (typeof(objMain)!=DT_OBJECT) // object dont exist
         {
              return FALSE;
         }
         else
         {
              docMain= objMain->GetDocument();
              if (!instanceof(docMain, BaseDocument)) // is the doc realy a document?
              {
                   return FALSE;
              }
              else if (docMain->FindObject(objMain->GetMarker()))
              {
                   return TRUE;
              }
              else
              {
                   return FALSE;
              }
         }
    }



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

    On 14/05/2004 at 04:32, xxxxxxxx wrote:

    Not sure if this is necessary at all. If you pass an object pointer and this one is a null pointer then it means the object doesn´t exist. Same goes for COFFEE. Maybe I am misunderstanding it? :\



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

    On 14/05/2004 at 06:05, xxxxxxxx wrote:

    Hi.
    Thx for answer. This was helpful.


Log in to reply