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

    BC_ID_MODATA_IDs [SOLVED]

    SDK Help
    0
    5
    430
    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 21/10/2014 at 19:54, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R14-16 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi All 🙂

      Does anyone have any examples of these Id's use?
      BC_ID_MODATAINDEX and BC_ID_MODATATAGINDEX.

      Are these Ids relative to the Clone Index?

      If not, there is a way to know for a RayObject his Index, if was generated by a cloner? 🙂

      Best Regards,
      Renato

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

        On 23/10/2014 at 01:36, xxxxxxxx wrote:

        Hello,

        could you give us more information about what you are trying to do and what kind of plugin you are working on?

        Best wishes,
        Sebastian

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

          On 23/10/2014 at 14:03, xxxxxxxx wrote:

          Hi.

          We just need to recover from a RayObject the Mograph Index if this RayObject->link is generated by Mograph.

          I found these ID that seem related to this.

          So if i generate 100 clones with Mograph, would be useful to know while rendering the Mograph Index of any RayObject that generate the intersection.

          thanks
          Renato

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

            On 24/10/2014 at 02:30, xxxxxxxx wrote:

            Hello,

            a RayObject[URL-REMOVED]'s link references to the polygon object that was the base for this RayObject. This polygon object can be a virtual object in a generator's cache. To get the generator simply call GetCacheParent[URL-REMOVED]. Then you find the BC_ID_MODATAINDEX[URL-REMOVED] in the generator's (clone's) BaseContainer[URL-REMOVED]:

              
                                  BaseObject * cacheParent = rayObject->link->GetCacheParent();  
              
                                  if(cacheParent)  
                                  {  
                                      BaseContainer * bc = cacheParent->GetDataInstance();  
              
                                      const Int32 index = bc->GetInt32(BC_ID_MODATAINDEX,NOTOK);  
                                      if(index != NOTOK)  
                                      {  
                                          GePrint("index: "+String::IntToString(index));  
                                      }  
                                  }  
            

            best wishes,
            Sebastian


            [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

              On 24/10/2014 at 12:06, xxxxxxxx wrote:

              thanks Sebastian 🙂
              Renato

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