Depsgraph: Replace LIB_TAG_DOIT with hash lookup
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 22 Feb 2018 10:03:39 +0000 (11:03 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 22 Feb 2018 10:03:39 +0000 (11:03 +0100)
commit93072e44d11efe9528d2bb7a3a62784331bf0a08
treeb9b466b5e6f8526189057f458cdbdfb95af71623
parent76953a6ebd6d595df95277b3e3d5fa37fb1a9462
Depsgraph: Replace LIB_TAG_DOIT with hash lookup

This allows us to:

- Not mock around with tags stored in a global space,
    and not to iterate over all datablocks in the database
    to clear the tags.

- Properly deal with datablocks which might not be in main database.

    While it sounds crazy, it might be handy when dealing with preview,
    or some partial scene updates, such as motion paths.

- Avoids majority of places where depsgraph construction needed bmain.

    This is something what could help in blender2.8 branch.

From tests with production file here did not see any measurable slowdown.

Hopefully, there is no functional changes :)
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.h
source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/depsgraph/intern/depsgraph.cc