Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-06 09:48:51 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-06 09:48:51 +0400
commite85935dddfed92926742367606dbacd0a7feda25 (patch)
treeaa4482a9b6edbc01a70b3c72452f6df22f1f61b0 /source/blender/editors/space_action
parent7c2e4e28ba262199588ee234cbf991eed7983b0d (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_action')
-rw-r--r--source/blender/editors/space_action/action_edit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 092b738bab9..a80d425b90a 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -52,6 +52,7 @@
#include "BKE_action.h"
#include "BKE_fcurve.h"
+#include "BKE_global.h"
#include "BKE_nla.h"
#include "BKE_context.h"
#include "BKE_report.h"
@@ -1308,6 +1309,15 @@ void ACTION_OT_keyframe_type(wmOperatorType *ot)
/* ***************** Jump to Selected Frames Operator *********************** */
+static int actkeys_framejump_poll(bContext *C)
+{
+ /* prevent changes during render */
+ if (G.is_rendering)
+ return 0;
+
+ return ED_operator_action_active(C);
+}
+
/* snap current-frame indicator to 'average time' of selected keyframe */
static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
{
@@ -1361,7 +1371,7 @@ void ACTION_OT_frame_jump(wmOperatorType *ot)
/* api callbacks */
ot->exec = actkeys_framejump_exec;
- ot->poll = ED_operator_action_active;
+ ot->poll = actkeys_framejump_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;