Hi I have stumbled on a strange problem while calling the object GetDirty(DIRTYFLAGS_MATRIX).
The return value is always updated when I toggle the object visibility in either the VP or in render
from the object manager. My problem is that I'm currently checking whether the children of my generator
have changed and when they do, I tell the generator to recalculate it's output but because
GetDirty(DIRTYFLAGS_MATRIX) is updated every time a child visibility is toggled the generator
does an unnecessary update that I would like to avoid. I'm using R19 SDK.
sorry but, we don't have enough ressources to investigate why it have been coded that way 14 years ago and what could be the side effect on changing it.
could you be more verbose about the kind of object you are using ? For example mograph's object are really special, almost always dirty.
Please also, take a loog at our guidelines to use the forum's functionalities (specially the tags)
I'm pretty sure you are talking about python, that information is useful.
Also, sharing some code (if you can) will help us to reproduce the issue.
Are you using a python generator or you are creating your own plugin and your own NodeData ?
Thanks for the reply.
I'm talking about a c++ generator but it also happens in Python. There is really no need to share any code,
Just print the GetDirty(DIRTYFLAGS_MATRIX) using python after you toggle the object visibility in the object manager
and watch it produce a different number every time.
SetDirty(DIRTYFLAGS::MATRIX); is called when you change the editor or render mode.
I need to ask our tech team if somebody remember the reason for that.
Thanks. Waiting for your reply.
Any updates on this?
we are in the week of our summit 2021, answer may take longer
there's no really workaround expect tracking all the child object's state for the viewport/render mode and check by yourself if those have changes.
Depending on what you want to do it could even be worst than rebuilding your cache.
edit : this code have been there for more than 14 years.
Thanks, that seems like a bug to me, I mean the matrix should not be flagged as dirty on object visibility change.
Any chance this could be fixed?
To have dirty checks behave exactly the way you want it, you might simply store and compare the matrix or data of objects yourself.
That's what I usually do, and it frees you from all blackbox behavior.