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

    RayObject instances order [SOLVED]

    SDK Help
    0
    3
    280
    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

      On 17/06/2015 at 14:53, xxxxxxxx wrote:

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

      ---------
      I was testing instance objects with RayObject, instance with option "render instance"
      I see that they come at the end of the RayObject(s) list, is this always happening?? "so I can depend on this behavior".

      so when I loop over all RayObject(s), I get real objects first, then instances.

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

        On 18/06/2015 at 06:40, xxxxxxxx wrote:

        Hi Mohamed,

        currently it is correct, render instances come at the end. But why is this relevant? And you surely should not rely on such an implementation detail, as it may change in future versions of Cinema 4D.
        Rather use the instance member of the RayObject and check, if it is a nullptr or not. If it's unequal nullptr, it is a render instance.

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

          On 18/06/2015 at 07:15, xxxxxxxx wrote:

          thanks Andreas, consider this solved.

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