On 02/12/2016 at 14:59, xxxxxxxx wrote:
Cinema 4D Version: R18
Platform: Windows ;
I have a render engine and a really heavy scene containing all type of objects.
What I have to do is for each updated hierarchy object (cache bit), I have to update the engine as well.
If the scene doesn't contain any render instance, I parse the hierarchy and I check the cache bits.
The problems appear when the render instances come into play. Consider there are Arrays, Cloners, instance objects, everything with Render Instance enabled. The problem is when an "original" object's cache is changed, the instances don't have updated Cache bits. That means for each instance, I have to manually search if the originals they point have changed. This can create a very complex scenario since render instances can point to arrays with render instances e.t.c
It feels a little bit wrong to do all this work manually. Is there any way to know when to update the render instances as well ?
I use GetHDirty(...) to catch any hierarchy object change and then for each object, I check the Cache, Data and Matrix bits via GetDirty(...).
But Render instances really give me headache. What's the best practice to solve this ?
Thank you very much for your time.