Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_sequencer_api.c
| Show First 20 Lines • Show All 322 Lines • ▼ Show 20 Lines | static Sequence *rna_Sequences_new_movie(ID *id, | ||||
| int frame_start, | int frame_start, | ||||
| int fit_method) | int fit_method) | ||||
| { | { | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| SeqLoadData load_data; | SeqLoadData load_data; | ||||
| SEQ_add_load_data_init(&load_data, name, file, frame_start, channel); | SEQ_add_load_data_init(&load_data, name, file, frame_start, channel); | ||||
| load_data.fit_method = fit_method; | load_data.fit_method = fit_method; | ||||
| load_data.allow_invalid_file = true; | load_data.allow_invalid_file = true; | ||||
| double start_offset = -1; | Sequence *seq = SEQ_add_movie_strip(bmain, scene, seqbase, &load_data); | ||||
| Sequence *seq = SEQ_add_movie_strip(bmain, scene, seqbase, &load_data, &start_offset); | |||||
| DEG_relations_tag_update(bmain); | DEG_relations_tag_update(bmain); | ||||
| DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); | DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); | ||||
| WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); | WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); | ||||
| return seq; | return seq; | ||||
| } | } | ||||
| Show All 32 Lines | static Sequence *rna_Sequences_new_sound(ID *id, | ||||
| const char *file, | const char *file, | ||||
| int channel, | int channel, | ||||
| int frame_start) | int frame_start) | ||||
| { | { | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| SeqLoadData load_data; | SeqLoadData load_data; | ||||
| SEQ_add_load_data_init(&load_data, name, file, frame_start, channel); | SEQ_add_load_data_init(&load_data, name, file, frame_start, channel); | ||||
| load_data.allow_invalid_file = true; | load_data.allow_invalid_file = true; | ||||
| Sequence *seq = SEQ_add_sound_strip(bmain, scene, seqbase, &load_data, 0.0f); | Sequence *seq = SEQ_add_sound_strip(bmain, scene, seqbase, &load_data); | ||||
| if (seq == NULL) { | if (seq == NULL) { | ||||
| BKE_report(reports, RPT_ERROR, "Sequences.new_sound: unable to open sound file"); | BKE_report(reports, RPT_ERROR, "Sequences.new_sound: unable to open sound file"); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| DEG_relations_tag_update(bmain); | DEG_relations_tag_update(bmain); | ||||
| DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); | DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); | ||||
| ▲ Show 20 Lines • Show All 678 Lines • Show Last 20 Lines | |||||