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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/keyframing.c17
-rw-r--r--source/blender/editors/space_nla/nla_edit.c15
2 files changed, 26 insertions, 6 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 4cc0413be5b..10df3804cbd 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1122,7 +1122,8 @@ static float *get_keyframe_values(ReportList *reports,
float *buffer,
int buffer_size,
int *r_count,
- bool *r_force_all)
+ bool *r_force_all,
+ const struct AnimationEvalContext *anim_eval_context)
{
float *values;
@@ -1140,9 +1141,11 @@ static float *get_keyframe_values(ReportList *reports,
/* adjust the value for NLA factors */
if (!BKE_animsys_nla_remap_keyframe_values(
- nla_context, &ptr, prop, values, *r_count, index, r_force_all)) {
- BKE_report(
- reports, RPT_ERROR, "Could not insert keyframe due to zero NLA influence or base value");
+ nla_context, &ptr, prop, values, *r_count, index, r_force_all, anim_eval_context)) {
+ BKE_report(reports,
+ RPT_ERROR,
+ "Could not insert keyframe due to zero NLA influence, base value, or value "
+ "remapping failed");
if (values != buffer) {
MEM_freeN(values);
@@ -1306,7 +1309,8 @@ bool insert_keyframe_direct(ReportList *reports,
value_buffer,
RNA_MAX_ARRAY_LENGTH,
&value_count,
- NULL);
+ NULL,
+ anim_eval_context);
if (values == NULL) {
/* This happens if NLA rejects this insertion. */
@@ -1480,7 +1484,8 @@ int insert_keyframe(Main *bmain,
value_buffer,
RNA_MAX_ARRAY_LENGTH,
&value_count,
- &force_all);
+ &force_all,
+ anim_eval_context);
if (values != NULL) {
/* Key the entire array. */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index dd381cc92fb..88beb21f228 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -114,6 +114,7 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op)
int filter;
const bool do_solo = RNA_boolean_get(op->ptr, "isolate_action");
+ const bool use_upper_stack_evaluation = RNA_boolean_get(op->ptr, "use_upper_stack_evaluation");
bool ok = false;
/* get editor data */
@@ -135,6 +136,13 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op)
for (ale = anim_data.first; ale; ale = ale->next) {
AnimData *adt = ale->data;
+ if (use_upper_stack_evaluation) {
+ adt->flag |= ADT_NLA_EVAL_UPPER_TRACKS;
+ }
+ else {
+ adt->flag &= ~ADT_NLA_EVAL_UPPER_TRACKS;
+ }
+
/* try entering tweakmode if valid */
ok |= BKE_nla_tweakmode_enter(adt);
@@ -198,6 +206,13 @@ void NLA_OT_tweakmode_enter(wmOperatorType *ot)
"Enable 'solo' on the NLA Track containing the active strip, "
"to edit it without seeing the effects of the NLA stack");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+
+ prop = RNA_def_boolean(ot->srna,
+ "use_upper_stack_evaluation",
+ false,
+ "Evaluate Upper Stack",
+ "In tweak mode, display the effects of the tracks above the tweak strip");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/** \} */