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

    ObjectExist function

    SDK Help
    0
    3
    279
    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
      Helper
      last edited by

      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;
                }
           }
      }

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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? 😕

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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.

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