I'm pleased to announce that the first milestone towards getting the new Depsgraph engine into Blender has finally been passed. As of a few minutes ago (4pm local time, 14th September 2013), the code I've been working on in a separate repo can now be dropped into the Blender codebase and compiled (*). Woohoo!
Before we get ahead of ourselves, do note that this is just the first step in a lengthy multi-step integration process. As mentioned in my report this week:
1) A lot of Blender's internals (mainly in blenkernel, modifiers, a few also exist in the Render Engine conversions code, and any code which forced depsgraph updates in the past) still need to be modified (in some places, heavily butchered and reengineered) to work with the new system
2) There are still a few bits and pieces in the new core engine that need to be implemented before it can be truly functional. 2-3 of these are critical, but the rest can slowly be added in along concurrently with other work
3) To keep things manageable, initially we'll only be aiming to get this new engine working in terms of a limited subset of functionality that Blender currently offers. Once that stabilises out, this time it shouldn't be that hard to extend it out to cover all the other problematic areas we have.
At the very least though, things we'll have include:
a) any ID blocktypes being able to be handled,
b) finer granularity for things like drivers, bones, and rigidbody sims to avoid most pseudo-cyclic scenarios,
c) an extendable base engine/system, with less hardcoded evaluation orders and a unified dependency representation + evaluation codebase (i.e. no need for the scene update logic to be split in 2 and duplicated)
d) a design built with the need for a multithreaded scheduler in mind
So, what about the caveats mentioned earlier?
Well, for one thing, there is still a lot of integration and some core components missing, so you can't exactly run this code yet. Also, due to this missing stuff, there are still a lot of compiler warnings (usually about "unused variables") when you compile it (i.e. it doesn't compile "cleanly", but it does "successfully" compile).
To get it compiling as a module in Blender:
1) Checkout the repo (https://github.com/Aligorith/DepsgraphRefactor)
2) Copy (or symlink - as I'm currently doing, to make it easier to keep using version control on the core engine while it's still under heavy development) the "depsgraph" directory from that to "blender/source/blender/"
3) Modify the build system files in blender/source/blender to include the depsgraph module as part of the build process
Of course, as the amount of integration work increases, I'll soon have a modified version of the codebase up which includes all this ready to go. But until then, I'll be heading back to work :)