From 50f5f0957c400595a85889ea9f6777e1a861dd21 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 18 Jul 2017 12:43:22 +0200 Subject: Depsgraph: Cleanup, de-duplicate couple of utility functions --- source/blender/depsgraph/intern/depsgraph_intern.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/depsgraph/intern/depsgraph_intern.h') diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h index 2d8e7dc841c..ad55c219dc7 100644 --- a/source/blender/depsgraph/intern/depsgraph_intern.h +++ b/source/blender/depsgraph/intern/depsgraph_intern.h @@ -113,6 +113,11 @@ void deg_editors_id_update(struct Main *bmain, struct ID *id); void deg_editors_scene_update(struct Main *bmain, struct Scene *scene, bool updated); +/* Tagging helpers ------------------------------------------------------ */ + +void lib_id_recalc_tag(struct Main *bmain, struct ID *id); +void lib_id_recalc_data_tag(struct Main *bmain, struct ID *id); + #define DEG_DEBUG_PRINTF(...) \ do { \ if (G.debug & G_DEBUG_DEPSGRAPH) { \ -- cgit v1.2.3 From 414cc821d8d0e3156a3c1057ed382c32cf4b5031 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 18 Jul 2017 15:42:53 +0200 Subject: Depsgraph: Initial implementation of more granular tagging This commit makes it so that only ID components which correspond to the tag flag are tagged for update (previously the whole ID would have been updated in the most of cases). This allows us to have more granular tag flags and prevent tagging of things we don't want to be tagged. --- source/blender/depsgraph/intern/depsgraph_intern.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'source/blender/depsgraph/intern/depsgraph_intern.h') diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h index ad55c219dc7..5ab090f3b3d 100644 --- a/source/blender/depsgraph/intern/depsgraph_intern.h +++ b/source/blender/depsgraph/intern/depsgraph_intern.h @@ -118,11 +118,18 @@ void deg_editors_scene_update(struct Main *bmain, struct Scene *scene, bool upda void lib_id_recalc_tag(struct Main *bmain, struct ID *id); void lib_id_recalc_data_tag(struct Main *bmain, struct ID *id); -#define DEG_DEBUG_PRINTF(...) \ - do { \ - if (G.debug & G_DEBUG_DEPSGRAPH) { \ - fprintf(stderr, __VA_ARGS__); \ - } \ +#define DEG_DEBUG_PRINTF(...) \ + do { \ + if (G.debug & G_DEBUG_DEPSGRAPH) { \ + fprintf(stderr, __VA_ARGS__); \ + fflush(stderr); \ + } \ + } while (0) + +#define DEG_ERROR_PRINTF(...) \ + do { \ + fprintf(stderr, __VA_ARGS__); \ + fflush(stderr); \ } while (0) } // namespace DEG -- cgit v1.2.3