Page MenuHome

Depsgraph: Introduce depsgraph registry

Authored by Sergey Sharybin (sergey) on Mon, Sep 9, 11:38 AM.



Allows to access dependency graphs created for render engines
to inform them about changes in .blend file structure from the
Python handlers.

Diff Detail

rB Blender

Event Timeline

I think we need one registry per Main, for preview render to work?

I am not sure about that.

Previews are still using same datablocks as the "main" bmain. So still need to be informed about changes there?
Same goes to Freestyle, which have its own main.

And for the preview, those will also run the handlers, which could modify the scene as well. And those will not have correct bmain i think? So all those edits will not be reflected by a proper depsgraph tags.

Preview render makes a copy of the datablocks and adds them to its own main. Freestyle generates a completely new main with new datablocks. And I think that's a good thing, to keep them completely separate.

We should not run handlers for either of those cases I think. Preview render updates are already signalled in their own way, and I'd rather keep that separate since we need some control over when they are done exactly, which is different than the main database.

I am also wondering about the thread-safety of calling DEG_on_visible_update on a render depsgraph. In principle any scene edits are problematic already, just wondering if this patch could introduce new crashes.

Made storage per-bmain.

This revision is now accepted and ready to land.Mon, Sep 9, 3:15 PM
This revision was automatically updated to reflect the committed changes.