object links



  • 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



  • 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


Log in to reply