Fix T68700: Incorrect 'absolute' timing of animated masks in the Video
Sequence Editor Code in 'seq_render_mask' will effectively do BKE_mask_evaluate(mask_temp, mask->sfra + (cfra - fra_offset), true) where 'fra_offset' is zero for absolute and seq->start for relative. If we really want the scene's current frame (as advertised) if Mask Time is set to Absolute (effectively ignoring the Mask Settings start/end) we need to change the fra_offset from zero to mask->sfra. Also BKE_animsys_evaluate_animdata should take mask->sfra into account as well (otherwise mask animation [points] and other animation [e.g. opacity] will run out of sync) Reviewers: campbellbarton, ISS Maniphest Tasks: T68700 Differential Revision: https://developer.blender.org/D5495
This commit is contained in:
parent
fa76f08db5
commit
b77da65e8c
@ -34,6 +34,7 @@
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "DNA_mask_types.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
@ -1044,7 +1045,7 @@ ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context,
|
||||
frame_offset = seq->start;
|
||||
}
|
||||
else /*if (smd->mask_time == SEQUENCE_MASK_TIME_ABSOLUTE)*/ {
|
||||
frame_offset = 0;
|
||||
frame_offset = ((Mask *)smd->mask_id)->sfra;
|
||||
}
|
||||
|
||||
ImBuf *mask = modifier_mask_get(smd, context, cfra, frame_offset, ibuf->rect_float != NULL);
|
||||
|
@ -3340,7 +3340,7 @@ static ImBuf *seq_render_mask(const SeqRenderData *context, Mask *mask, float nr
|
||||
|
||||
/* anim-data */
|
||||
adt = BKE_animdata_from_id(&mask->id);
|
||||
BKE_animsys_evaluate_animdata(context->scene, &mask_temp->id, adt, nr, ADT_RECALC_ANIM, false);
|
||||
BKE_animsys_evaluate_animdata(context->scene, &mask_temp->id, adt, mask->sfra + nr, ADT_RECALC_ANIM, false);
|
||||
|
||||
maskbuf = MEM_mallocN(sizeof(float) * context->rectx * context->recty, __func__);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user