Voronoi cache is not changed
-
On 11/01/2018 at 06:17, xxxxxxxx wrote:
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. -
On 12/01/2018 at 09:10, xxxxxxxx wrote:
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
-
On 14/01/2018 at 14:00, xxxxxxxx wrote:
Hello and thank you for your answer.
Is GetHDirty referring to the actual hierarchy children or cache children ?
Thank you.
-
On 26/01/2018 at 07:01, xxxxxxxx wrote:
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.