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
    • Recent
    • Tags
    • Users
    • Login

    SetID

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 206 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 11/07/2011 at 02:54, xxxxxxxx wrote:

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

      ---------
      Hi,

      I have 2 questions.

      I have a subcontainer bcsub (with the ID idbcsub) in a container bc.
      Calling bc->RemoveData(idbcsub) never returns true, although the entry has disappeared from the index.
      This is also the case when using FindIndex, RemoveIndex.
      Is the memory really freed?

      How do I change the ID of a subcontainer, without copying etc. The following does not change the ID.

      BaseContainer* bcsub = bc->GetContainerInstance(idbcsub);
      bcsub->SetID(NewID)

      What i expected to see was the sub container with the new id in the index list.

      Best,

      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 22/07/2011 at 02:23, xxxxxxxx wrote:

        Sorry, I can't confirm these errors.

        Following test code works fine for me:

          
        BaseContainer *bc = NULL;  
        bc = gNew BaseContainer;  
        BaseContainer subbc(1020660);  
          
        bc->SetContainer(1000, subbc);  
          
        if (bc->RemoveData(1000)) GePrint("removed");  
        else GePrint("not removed");  
          
        gDelete(bc);  
          
        //old ID  
        GePrint(LongToString(subbc.GetId()));  
          
        subbc.SetId(1020661);  
          
        //new ID  
        GePrint(LongToString(subbc.GetId()));  
        

        cheers,
        Matthias

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