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

    i.d. stuff

    SDK Help
    0
    5
    371
    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 12/07/2004 at 13:08, xxxxxxxx wrote:

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

      ---------
      I dont mean to be thick, but could someone please clarify a small point? I cant determine if an object is a SpherifyObject by using getclass( ), but the i.d. for one is 1001003.
         if ( obj->GetType()==1001003 )  println("a spherify object!");
      Is this a SAFE way to recognize an object , or do the i.d. s  ever change in different versions of cinema  ...
      cheers....

      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 13/07/2004 at 15:05, xxxxxxxx wrote:

        edit* I just noticed this is a coffee question. Sorry my response was for c++.
         
        Try doing it like this instead

        if(obj->GetType() == Osphere)
        {
        ...
        }
        
        

        Besides being safe between different versions of cinema, its much easier to read 🙂

        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 13/07/2004 at 16:33, xxxxxxxx wrote:

          Thanks anyway..........!

          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 13/07/2004 at 16:49, xxxxxxxx wrote:

            The IDs had better not change too often, or compiled C++ plugins would break. A prettier way, though no more dynamic, is to copy the enum or define from the C++ API to the top of your C.O.F.F.E.E. code. (I.e. so you could write Ospherify instead of 1001003.)

                
                
                const var Ospherify = 1001003;
            
            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/07/2004 at 06:44, xxxxxxxx wrote:

              Thanks for the help Mikael....
              I am a little paranoid at times!

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