THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/09/2011 at 09:56, xxxxxxxx wrote:
I would use a BaseContainer (as part of the plugin de facto) and save/load it with the Get/SetWorldPluginData(). This allows settings/preferences to be stored contiguously between uses and invocations of Cinema 4D. I think that you will not need a static class member to achieve your ends. You should be able to use a regular class member (or simply a BaseContainer resource/description) as long as you do your storing as part of some message or destructor action. Not quite sure of your intentions so it is hard to advise.
Remember that a plugin object (tag, tool, object, etc.) has a description container which you can set/get and store/load current values using the plugin data functionality of the SDK. For instance, if you want to store an error log as a set of strings, you could do it by creating a subcontainer that has a range of values which reference a list of strings representing the list of log entries. The subcontainer would have a unique ID in the basecontainer and the string subcontainer values could be linearly contiguous (0->n, for instance). While the SDK BaseContainer approach is a bit strange and difficult, it does afford some level of flexibility and adherence so you do not need to track every bit of information (such as file reading/writing and tracking/insertion/deletion). In this case, as an appended list, it would work well with the BaseContainer ideology as long as you track counts (number of log entries). You can even add that value as an entry in the container:
LONG logentries
entry 0
...
entry logentries-1=