On 21/05/2013 at 02:18, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :
---------
Hello,
I was wondering what the proper way of re-using a generator's cache is. How does Cinema know
I re-used the cache? And what if I only want to re-use certain parts of the cache?
For example:
/* .. */ GetVirtualObjets(BaseObject* host, HierarchyHelp* hh) {
// ..
BaseObject* root = BaseObject::Alloc(Onull);
BaseObject* cache = host->GetCache();
BaseObject* obj = NULL;
if (cache) {
obj = cache->GetDown();
if (obj) obj->Remove();
}
if (!obj) obj = BaseObject::Alloc(Ocube);
if (obj) obj->InsertUnder(root);
// ..
return root;
}
Can I do this safely?
Thanks,
-Niklas