diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-28 15:04:21 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-28 16:24:56 +0300 |
commit | 9d6bd665e31badbc98ac4c86a4af4f1211d34587 (patch) | |
tree | ee8464e7afecec1888e7b081d0fc1198decfaa02 /source/blender/depsgraph/DEG_depsgraph.h | |
parent | db2a603f6ef8ffc6f0b72fe108710d88ccd2f85d (diff) |
Depsgraph: Wrap context used for editors update callback into a structure
This way we can extend it much easier.
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph.h')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h index dc6afee409c..25e5714a7d7 100644 --- a/source/blender/depsgraph/DEG_depsgraph.h +++ b/source/blender/depsgraph/DEG_depsgraph.h @@ -198,6 +198,7 @@ void DEG_graph_flush_update(struct Main *bmain, Depsgraph *depsgraph); */ void DEG_ids_check_recalc(struct Main *bmain, struct Scene *scene, + struct ViewLayer *view_layer, bool time); /* ************************************************ */ @@ -248,10 +249,17 @@ bool DEG_needs_eval(Depsgraph *graph); * to do their own updates based on changes. */ -typedef void (*DEG_EditorUpdateIDCb)(struct Main *bmain, struct ID *id); -typedef void (*DEG_EditorUpdateSceneCb)(struct Main *bmain, - struct Scene *scene, - int updated); +typedef struct DEGEditorUpdateContext { + struct Main *bmain; + struct Scene *scene; + struct ViewLayer *view_layer; +} DEGEditorUpdateContext; + +typedef void (*DEG_EditorUpdateIDCb)( + const DEGEditorUpdateContext *update_ctx, + struct ID *id); +typedef void (*DEG_EditorUpdateSceneCb)( + const DEGEditorUpdateContext *update_ctx, int updated); /* Set callbacks which are being called when depsgraph changes. */ void DEG_editors_set_update_cb(DEG_EditorUpdateIDCb id_func, |