diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-06 09:48:51 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-06 09:48:51 +0400 |
commit | e85935dddfed92926742367606dbacd0a7feda25 (patch) | |
tree | aa4482a9b6edbc01a70b3c72452f6df22f1f61b0 /source/blender/editors/space_graph/graph_ops.c | |
parent | 7c2e4e28ba262199588ee234cbf991eed7983b0d (diff) |
Fix #33423: a few operators still allowed changing current frame during
animation render, like cursor set in the graph editor, disabled that now.
Diffstat (limited to 'source/blender/editors/space_graph/graph_ops.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_ops.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 9b031c015a9..54b417e740a 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -39,6 +39,7 @@ #include "BLI_utildefines.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BKE_main.h" #include "BKE_sound.h" @@ -66,6 +67,15 @@ * 2) Value Indicator (stored per Graph Editor instance) */ +static int graphview_cursor_poll(bContext *C) +{ + /* prevent changes during render */ + if (G.is_rendering) + return 0; + + return ED_operator_graphedit_active(C); +} + /* Set the new frame number */ static void graphview_cursor_apply(bContext *C, wmOperator *op) { @@ -172,7 +182,7 @@ static void GRAPH_OT_cursor_set(wmOperatorType *ot) ot->exec = graphview_cursor_exec; ot->invoke = graphview_cursor_invoke; ot->modal = graphview_cursor_modal; - ot->poll = ED_operator_graphedit_active; + ot->poll = graphview_cursor_poll; /* flags */ ot->flag = OPTYPE_BLOCKING | OPTYPE_UNDO; |