Depsgraph: Make it possible to check for ID directly tagged for animation recalc

This commit is contained in:
Sergey Sharybin
2018-04-26 17:22:17 +02:00
parent 67b014af48
commit 46a256b5d1

View File

@@ -376,6 +376,15 @@ void deg_graph_id_tag_update_single_flag(Main *bmain,
DepsNodeFactory *factory = deg_type_get_factory(component_type);
BLI_assert(factory != NULL);
id->recalc |= factory->id_recalc_tag();
/* NOTE: This way we clearly separate direct animation recalc flag from
* a flushed one. Needed for auto-keyframe hack feature.
*
* TODO(sergey): Find a more generic way to set/access direct tagged ID
* recalc flags.
*/
if (tag == DEG_TAG_TIME) {
id->recalc |= ID_RECALC_TIME;
}
/* Some sanity checks before moving forward. */
if (id_node == NULL) {
/* Happens when object is tagged for update and not yet in the