Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search

Voronoi cache is not changed

Author
Message
  Topic Search Topic Search
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 349
Direct Link To This Post Topic: Voronoi cache is not changed
    Posted: 2018 Jan 11 at 6:17am

User Information:

Cinema 4D Version:   R18 
Platform:   Windows  ;   
Language(s):     C++  ;   

---------

Hello.

I have a Voronoi Fracture and as child it has a sphere with a material. Once I replace the material by dragging and dropping a different one on the same tag, an EVMSG_DOCUMENTRECALCULATED event is generated.

At that moment, I parse the hierarchy to see what has changed. The problem is that even though I get a DIRTYFLAGS_CACHE due to the change on the sphere, I cannot use it since it is a control object (BIT_CONTROLOBJECT). Is it possible to receive the notification on the voronoi that one of its CACHE children has changed ?

The problem here is that If I do the same on an Array, it gives me a dirty cache mask while Voronoi doesn't.
 
Thank you for your time.
Back to Top
knickknack View Drop Down
Forum Moderator
Forum Moderator


Joined: 2016 Jul 01
Location: Italy
Online Status: Offline
Posts: 268
Direct Link To This Post Posted: 2018 Jan 12 at 9:10am
Hi Peterakos, thanks for writing us.

With regard to the your request, although I see your intent to optimize the search for any dirty status change, I suggest to try to use C4DAtom::GetHDirty() rather than C4DAtom::GetDirty().
In any case I warmly recommend no to make any assumption on the children's cache dirtiness based on the generator's cache dirtiness.

Best, Riccardo
MAXON Computer GmbH
SDK Support Team
Back to Top
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 349
Direct Link To This Post Posted: 2018 Jan 14 at 2:00pm
Hello and thank you for your answer.

Is GetHDirty referring to the actual hierarchy children or cache children ?

Thank you.
Back to Top
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 349
Direct Link To This Post Posted: 2018 Jan 26 at 7:01am
Hello.

Please allow me to bring this up again since I have tested everything and at this point I really don't know which path is better for my case.

I have a scene with a Cloner and an object as child. The object has a material. If I replace the material with a different one I receive a DIRTYFLAGS_CACHE update on cloner. Everything is fine here.

If I use the same scenario with a Voronoi instead of a cloner, once I replace the material of the child, Voronoi doesn't update its cache dirty bit. Somehow, I need to know that the Voronoi has changed. How can I do that ?

Should I manually set voronoi's Dirty flag once its child is updated ? That will cause the whole scene to be checked twice though. Can I avoid it ?

Thank you.
Back to Top

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.