Changeset View
Changeset View
Standalone View
Standalone View
source/blender/sequencer/intern/effects.c
| Show First 20 Lines • Show All 3,017 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Editing *ed; | Editing *ed; | ||||
| ListBase *seqbasep; | ListBase *seqbasep; | ||||
| ImBuf *i = NULL; | ImBuf *i = NULL; | ||||
| ed = context->scene->ed; | ed = context->scene->ed; | ||||
| seqbasep = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); | seqbasep = SEQ_get_seqbase_by_seq(&ed->seqbase, seq); | ||||
sergey: Add explanation about the clamping. Having a comment is always living with the code, which… | |||||
| /* Clamp timeline_frame to strip range so it behaves as if it had "still frame" offset (last | |||||
| * frame is static after end of strip). This is how most strips behave. This way transition | |||||
| * effects that doesn't overlap or speed effect can't fail rendering outside of strip range. */ | |||||
| timeline_frame = clamp_i(timeline_frame, seq->startdisp, seq->enddisp - 1); | |||||
| if (seq->machine > 1) { | if (seq->machine > 1) { | ||||
| i = seq_render_give_ibuf_seqbase(context, timeline_frame, seq->machine - 1, seqbasep); | i = seq_render_give_ibuf_seqbase(context, timeline_frame, seq->machine - 1, seqbasep); | ||||
| } | } | ||||
| /* found nothing? so let's work the way up the metastrip stack, so | /* found nothing? so let's work the way up the metastrip stack, so | ||||
| * that it is possible to group a bunch of adjustment strips into | * that it is possible to group a bunch of adjustment strips into | ||||
| * a metastrip and have that work on everything below the metastrip | * a metastrip and have that work on everything below the metastrip | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 1,309 Lines • Show Last 20 Lines | |||||
Add explanation about the clamping. Having a comment is always living with the code, which commit message gets faded away with time.
You can make the commit message more terse, but have more explanation in the code which is not obvious at a glance :)