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

    Type checking

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 281 Views
    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 Offline
      Helper
      last edited by

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

      On 11/10/2010 at 08:26, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Just wondering if there's any difference between these two checks:
      if(ob->IsInstanceOf(Opolygon))
      AND
      if(ob->GetType() == Opolygon)
      Is there any case where an object's instance and type differ?

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

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

        On 12/10/2010 at 02:02, xxxxxxxx wrote:

        The difference is that with GetType() you check the object type, where with IsInstance you from which class the object is derived from. For instance checking for Ocube is possible but there is no CubeObject or something like this. Also there are objects that are derived from PolygonObject but not of type Opolygon, for instance the Joint object. So if you want to find out if the object is really a polyogn object use GetType() == Opolygon.

        cheers,
        Matthias

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

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

          On 12/10/2010 at 10:26, xxxxxxxx wrote:

          Thanks, makes better sense now.

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