THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/06/2006 at 09:13, xxxxxxxx wrote:
Cinema 4D Version: 9.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
I have to ask a question, call me stupid, but I do not know how:
I developed an individual Tagplugin (PLuginTag derived) and I have to store some more Data in it (array of Int). SDK tells me, not to do so and I see why: It gets really, really slow. But when I do not store this array in the tagplugins Basecontainer, the data is lost after deactivating my indivual tag in the document and activating another object. When I click on my tag again, all data is gone, although the array the data is stored in is a private variable-property of my plugin (C.O.F.F.E.E.-array). Cinema seems to keep created scene-objects temporarily in memory to save more of it, right? So the created instance of my tag is destroyed when deactivated and recreated on reactivating it, am I right? Basecontainers seem to be needed to store data persistent through this process. Please correct me, if I am wrong. Storing the Coffeearray directly does not work to0: I have to store its elements with a container-elemtent-id per arrayelement to get some data back out of the container. Otherwise the BaseContainer->GetData-Function always just returns NULL. But this of course is very slow.
But how can arraydata be stored persistent without using Basecontainers? Cinema seems to do it itself with the Polygon- or Pointtags for example and these do not seem to be slow at all to me. So if anyone has got an idea i would be greatfull for some help.
A, well, neary forgot: The data represents the selection of Polygons in object different from the tags object. I tried to store a baseselect in the container directly but it wont work (perhaps because a BaseSelect needs a matching PolygonTag?)
But perhaps there is another clever solution to store Polygonselections of a different object in a tag someon of you knows, so this could be very helpful too.