Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/05/2009 at 13:36, xxxxxxxx wrote:
User Information: Cinema 4D Version: r11 Platform: Windows ; Language(s) : C++ ;
--------- hi,
i am facing performance issues. while my object plugin is parametric there is a HUGE editor slowdown. i know why (because the object is rebuilt everytime something changes within the editor, nomatter if it belongs to my plugin object or not)
within the BaseObject *MyPluginObject::GetVirtualObjects(PluginObject *op, HierarchyHelp *hh) { ... Part i have placed all the generating code (which can easiely get quite complex due to high counts and much calculations)
So i wonder how i can prevent this and just have the object to be rebuilt when some parameters or childobjects have changed..
thanks for any help, ello
On 18/05/2009 at 13:41, xxxxxxxx wrote:
Really, you should use the search-function of this forum. Just the keyword 'cache' helped me to find an entry within a few seconds. Hope it helps
click
cheers, Shawni
On 18/05/2009 at 14:26, xxxxxxxx wrote:
thanks. my fault, i didnt search in message body
anyhow, now other strange things happen, but i'll try to get the hang of it...
cheers, ello
edit: now i get memory leaks, they are related to this:
> `
\> dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA|DIRTY_CHILDREN); \> \> if (!dirty) return op->GetCache(hh); \>
`
what do i need to do, now?
On 19/05/2009 at 03:44, xxxxxxxx wrote:
Free the objects you allocated before returning the cache
Greetings, Jack
On 20/05/2009 at 12:53, xxxxxxxx wrote:
thank you! that helped alot. now i need to find out how to let the object run from the beginning, as for now it just works after i changed a parameter
On 20/05/2009 at 15:17, xxxxxxxx wrote:
Quote: Originally posted by anubis23 on 20 May 2009 > > * * * > > as for now it just works after i changed a parameter > > > * * *
Isn't that what you wanted?
On 20/05/2009 at 15:28, xxxxxxxx wrote:
yes, but if i have one of my plugin objects as a child and i change its parameters, the change is only visible when i change a parameter of the other pluginobject (where the object is linked via IN_EXCLUDE).
On 20/05/2009 at 23:31, xxxxxxxx wrote:
Didn't you use the dependency list?
On 21/05/2009 at 05:55, xxxxxxxx wrote:
i have used it, but maybe not the right way?? this is how i did it:
\> zeit = doc->GetTime().GetFrame(doc->GetFps())*anmSpeed; \> if (anmSpeed!=0) bc->SetReal(ZEIT,zeit); \> \> BaseObject *main = BaseObject::Alloc(Onull); \> if (!main) goto Error; \> main->SetName(pluginName); \> BaseObject *child = NULL; \> InExcludeData *mylist = (InExcludeData* )bc->GetCustomDataType(CHILDLIST,CUSTOMDATATYPE_INEXCLUDE_LIST); \> if (!mylist ) goto Error; \> LONG objcnt = mylist->GetObjectCount(); \> LONG ccnt=0; \> op->NewDependenceList(); \> if (mylist) \> { \> for(int i=0; i<objcnt; i++) \> { \> op->AddDependence(hh,(BaseObject* )mylist->ObjectFromIndex(doc, i)); \> } \> if (profileLink) op->AddDependence(hh,(BaseObject* )(bc->GetLink(PROFILE,doc))); \> if (userSpline) op->AddDependence(hh,(SplineObject* )(bc->GetLink(USERSPLINE,doc))); \> if (child) op->AddDependence(hh,child); \> } \> op->TouchDependenceList(); \> Bool dirty=FALSE; \> dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA|DIRTY_CHILDREN); \> if (!dirty) \> { \> blDelete(main); \> return op->GetCache(hh); \> } \>
the first lines are there to make the animation possible. i guess there is a more elegant way, too..
if i put those AddDependence Lines into the if(!dirty) condition the objects only get invisible when changing parameters