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

    object links

    SDK Help
    0
    2
    581
    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 27/11/2002 at 00:44, xxxxxxxx wrote:

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

      ---------
      im having a problem with  storage of object links in a container
      look at this
      if (roottag) 
        {
         BaseContainer *data=roottag->GetDataInstance();
         LONG count=data->GetLong(10001);
      if (object) GePrint ("ok object exists");  // the object i will store exists
         data->SetLink(count*3+2,(BaseObject* )object);   // store this link
        BaseObject *test = data->GetObjectLink(count*3+2,doc); // get this link
        if (test) GePrint ("ok got it!!");  //  validate link

      data->SetLong(10001,++count);
        }
       
      when i test the link , it doesnt exist ????
      the link is not there although i just wrote it to the data basecontainer.
      whats going on here 😕
       
       
      cheers
       
      Paul

      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 27/11/2002 at 00:55, xxxxxxxx wrote:

        sorted it.
        the problem was with the object i was trying to link.
        it came from
          void *obj = NULL;
          GetDragObject(msg,&type,&obj);
        so i needed to get the real object from the atomarray
        BaseObject *RealObject= (BaseObject* )((AtomArray* )obj)->GetIndex(0);
        then i have the correct object.
         
        cheers
         
        Paul

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