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

    Generic tree hierarchy saved with doc

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 216 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 18/06/2007 at 18:36, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R8.2-R10 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      This is a tricky one. My plugin needs to store a 'group' tree hierarchy where a group (class) may contain a list of elements - for example:

      group A  
           group B  
                element 1...n  
           group C  
                group D  
                     element 1...n  
                element 1...n
      

      In memory, I can just allocate an array of G groups and do the pointing to reflect the hierarchy and allocate an array of N elements for each group as required.

      If the Cinema 4D element is copied, then it is no big deal to copy this structure in the CopyTo(). But saving and loading from a document file (Read and Write) is another story unless verbose information is stored about the hierarchical elements in a form that is memory independent (pointers). The question arises about how to save this information so that the hierarchy can be reconstructed from a saved C4D document.

      Suggestions welcomed!

      Thanks,

      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 19/06/2007 at 18:01, xxxxxxxx wrote:

        Well, I've decided that LONG ids are the way to go. This way connections can be 'remade' on load. Sort of follows the standard Cinema 4D way in this sense.

        Thank ye all. 🙂

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