Deleting material doesn't change cache or data bit
On 09/11/2016 at 14:26, xxxxxxxx wrote:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
I have a render engine in which I pass the objects and materials from Cinema 4D.
What I try to do is to update the engine data based on Cinema4D hierarchy changes.
I do that by reading DIRTYFLAGS_MATRIX , DIRTYFLAGS_CACHE and DIRTYFLAGS_DATA bits using GetDirty on every object, tag and material in the hierarchy.
But, whenever I delete a material which is set in a texture tag, the cache bits of this tag and object are not updated, even though the material parameter of the texture tag is empty.
The other alternative solution would be to scan the material list and save the state. Is there anything else I can do to avoid this ? (since it can be really slow in huge scenes).
Thank you very much for your time.
On 09/11/2016 at 14:44, xxxxxxxx wrote:
The actual data in the tag doesn't change, only the link becomes invalid. That's why the material parameter
appears suddenly empty, although the actual "value" didn't change.
On 10/11/2016 at 03:27, xxxxxxxx wrote:
Hello and thank you very much for your help Niklas.
So, basically, what I have to do to "catch" the change is to check the link if it is still valid right ?