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_data.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_data.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 90a2b2d613c..ac4fd9913d0 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -594,8 +594,8 @@ static int gp_frame_duplicate_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd); - Depsgraph *depsgraph = CTX_data_depsgraph(C); - int cfra_eval = (int)DEG_get_ctime(depsgraph); + Scene *scene = CTX_data_scene(C); + int cfra_eval = CFRA; int mode = RNA_enum_get(op->ptr, "mode"); |