diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-07-26 15:13:53 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-07-26 16:16:52 +0300 |
commit | 9270c15af8fc6b1fccf6dd6976f5bd0fe0342790 (patch) | |
tree | b12ee92a094db4d0b8ad5e7022df25ac3e0b071f /source/blender/editors/gpencil/gpencil_add_monkey.c | |
parent | ad18d331d773518088b1b918038244bc5c5d253d (diff) |
GPencil: Get current frame from scene
This change makes it so current frame is queried from a scene rather
than from a dependency graph. This makes it possible to avoid the
fact that dependency graph might not be fully evaluated yet.
There are still some cases where it frame is queried from the graph,
but those seems to be in a code path where we need to ensure valid
dependency graph anyway.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5349
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_add_monkey.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_add_monkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_add_monkey.c b/source/blender/editors/gpencil/gpencil_add_monkey.c index 4d62d169bf8..38d0c0cd07d 100644 --- a/source/blender/editors/gpencil/gpencil_add_monkey.c +++ b/source/blender/editors/gpencil/gpencil_add_monkey.c @@ -829,8 +829,8 @@ static const ColorTemplate gp_monkey_pct_pupils = { void ED_gpencil_create_monkey(bContext *C, Object *ob, float mat[4][4]) { Main *bmain = CTX_data_main(C); - Depsgraph *depsgraph = CTX_data_depsgraph(C); - int cfra_eval = (int)DEG_get_ctime(depsgraph); + Scene *scene = CTX_data_scene(C); + int cfra_eval = CFRA; bGPdata *gpd = (bGPdata *)ob->data; bGPDstroke *gps; |