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

    Instance from rayobject

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 426 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 31/05/2007 at 05:15, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.6 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :

      ---------
      Hi All,

      i need to identify if a rayobject is generated by a Instance.. but when i try:
      RayObject->GetType(Oinstance)
      or
      RayObject->IsInstanceOf(Oinstance) )

      return always the Opolygon.. that is the Editable result of the cloned render document.

      any Help?

      Best regards
      Renato

      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 01/06/2007 at 06:08, xxxxxxxx wrote:

        You can get the object primitives with RayObject->link->GetCacheParent(). The problem with instance objects is they are linked through BaseLinks, so they have no hierachical conenction. This means you only get the primitive that the Instance is linked to, for instance you have an instance object of a cube, you will get the cube primitive returned instead of the instance object. I have no idea yet how to get the linked instance object.

        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 01/06/2007 at 06:14, xxxxxxxx wrote:

          Thanks Matthias,

          this is enough 🙂

          I've just verified this.. i can compare the pointers to detect if the object is the same.

          Thanks!
          Renato

          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 01/06/2007 at 06:37, xxxxxxxx wrote:

            you can get the instance by going even more one step up with GetCacheparent. So for example if it returns a cube you just go up until you find the instance.

            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 01/06/2007 at 06:43, xxxxxxxx wrote:

              Thanks 🙂

              Renato

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