Changeset View
Changeset View
Standalone View
Standalone View
source/blender/sequencer/intern/strip_transform.c
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | void SEQ_transform_fix_single_image_seq_offsets(const Scene *scene, Sequence *seq) | ||||
| } | } | ||||
| /* make sure the image is always at the start since there is only one, | /* make sure the image is always at the start since there is only one, | ||||
| * adjusting its start should be ok */ | * adjusting its start should be ok */ | ||||
| left = SEQ_time_left_handle_frame_get(scene, seq); | left = SEQ_time_left_handle_frame_get(scene, seq); | ||||
| start = seq->start; | start = seq->start; | ||||
| if (start != left) { | if (start != left) { | ||||
| const int offset = left - start; | const int offset = left - start; | ||||
| SEQ_time_left_handle_frame_set( | seq_time_translate_handles(scene, seq, -offset); | ||||
| scene, seq, SEQ_time_left_handle_frame_get(scene, seq) - offset); | |||||
| SEQ_time_right_handle_frame_set( | |||||
| scene, seq, SEQ_time_right_handle_frame_get(scene, seq) - offset); | |||||
| seq->start += offset; | seq->start += offset; | ||||
| } | } | ||||
| } | } | ||||
| bool SEQ_transform_sequence_can_be_translated(Sequence *seq) | bool SEQ_transform_sequence_can_be_translated(Sequence *seq) | ||||
| { | { | ||||
| return !(seq->type & SEQ_TYPE_EFFECT) || (SEQ_effect_get_num_inputs(seq->type) == 0); | return !(seq->type & SEQ_TYPE_EFFECT) || (SEQ_effect_get_num_inputs(seq->type) == 0); | ||||
| } | } | ||||
| Show All 31 Lines | void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delta) | ||||
| /* Meta strips requires special handling: their content is to be translated, and then frame range | /* Meta strips requires special handling: their content is to be translated, and then frame range | ||||
| * of the meta is to be updated for the updated content. */ | * of the meta is to be updated for the updated content. */ | ||||
| if (seq->type == SEQ_TYPE_META) { | if (seq->type == SEQ_TYPE_META) { | ||||
| Sequence *seq_child; | Sequence *seq_child; | ||||
| for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { | for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { | ||||
| SEQ_transform_translate_sequence(evil_scene, seq_child, delta); | SEQ_transform_translate_sequence(evil_scene, seq_child, delta); | ||||
| } | } | ||||
| /* Move meta start/end points. */ | /* Move meta start/end points. */ | ||||
| SEQ_time_left_handle_frame_set( | seq_time_translate_handles(evil_scene, seq, delta); | ||||
| evil_scene, seq, SEQ_time_left_handle_frame_get(evil_scene, seq) + delta); | |||||
| SEQ_time_right_handle_frame_set( | |||||
| evil_scene, seq, SEQ_time_right_handle_frame_get(evil_scene, seq) + delta); | |||||
| } | } | ||||
| else { /* All other strip types. */ | else { /* All other strip types. */ | ||||
| seq->start += delta; | seq->start += delta; | ||||
| /* Only to make files usable in older versions. */ | /* Only to make files usable in older versions. */ | ||||
| seq->startdisp = SEQ_time_left_handle_frame_get(evil_scene, seq); | seq->startdisp = SEQ_time_left_handle_frame_get(evil_scene, seq); | ||||
| seq->enddisp = SEQ_time_right_handle_frame_get(evil_scene, seq); | seq->enddisp = SEQ_time_right_handle_frame_get(evil_scene, seq); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 611 Lines • Show Last 20 Lines | |||||