Generic tree hierarchy saved with doc
-
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,
-
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.