Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/sequencer.c
| Show First 20 Lines • Show All 3,221 Lines • ▼ Show 20 Lines | for (i = 0; i < totviews; i++) { | ||||
| if (i != context->view_id) { | if (i != context->view_id) { | ||||
| BKE_sequencer_cache_put( | BKE_sequencer_cache_put( | ||||
| &localcontext, seq, cfra, SEQ_CACHE_STORE_PREPROCESSED, ibuf_arr[i], 0); | &localcontext, seq, cfra, SEQ_CACHE_STORE_PREPROCESSED, ibuf_arr[i], 0); | ||||
| } | } | ||||
| } | } | ||||
| /* return the original requested ImBuf */ | /* return the original requested ImBuf */ | ||||
| ibuf = ibuf_arr[context->view_id]; | ibuf = ibuf_arr[context->view_id]; | ||||
| if (ibuf) { | |||||
| seq->strip->stripdata->orig_width = ibuf->x; | |||||
| seq->strip->stripdata->orig_height = ibuf->y; | |||||
| } | |||||
| /* "remove" the others (decrease their refcount) */ | /* "remove" the others (decrease their refcount) */ | ||||
| for (i = 0; i < totviews; i++) { | for (i = 0; i < totviews; i++) { | ||||
| if (ibuf_arr[i] != ibuf) { | if (ibuf_arr[i] != ibuf) { | ||||
| IMB_freeImBuf(ibuf_arr[i]); | IMB_freeImBuf(ibuf_arr[i]); | ||||
| } | } | ||||
| } | } | ||||
| MEM_freeN(ibuf_arr); | MEM_freeN(ibuf_arr); | ||||
| Show All 18 Lines | if (sanim && sanim->anim) { | ||||
| } | } | ||||
| if (ibuf) { | if (ibuf) { | ||||
| BKE_sequencer_imbuf_to_sequencer_space(context->scene, ibuf, false); | BKE_sequencer_imbuf_to_sequencer_space(context->scene, ibuf, false); | ||||
| /* we don't need both (speed reasons)! */ | /* we don't need both (speed reasons)! */ | ||||
| if (ibuf->rect_float && ibuf->rect) { | if (ibuf->rect_float && ibuf->rect) { | ||||
| imb_freerectImBuf(ibuf); | imb_freerectImBuf(ibuf); | ||||
| } | } | ||||
| seq->strip->stripdata->orig_width = ibuf->x; | |||||
| seq->strip->stripdata->orig_height = ibuf->y; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return ibuf; | return ibuf; | ||||
| } | } | ||||
| static ImBuf *seq_render_movieclip_strip(const SeqRenderData *context, Sequence *seq, float nr) | static ImBuf *seq_render_movieclip_strip(const SeqRenderData *context, Sequence *seq, float nr) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 2,459 Lines • ▼ Show 20 Lines | Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) | ||||
| strip = seq->strip; | strip = seq->strip; | ||||
| BLI_strncpy(seq->strip->colorspace_settings.name, | BLI_strncpy(seq->strip->colorspace_settings.name, | ||||
| colorspace, | colorspace, | ||||
| sizeof(seq->strip->colorspace_settings.name)); | sizeof(seq->strip->colorspace_settings.name)); | ||||
| /* we only need 1 element for MOVIE strips */ | /* we only need 1 element for MOVIE strips */ | ||||
| strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem"); | strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem"); | ||||
| strip->stripdata->orig_height = IMB_anim_get_height(anim_arr[0]); | |||||
| strip->stripdata->orig_width = IMB_anim_get_width(anim_arr[0]); | |||||
| BLI_split_dirfile(seq_load->path, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name)); | BLI_split_dirfile(seq_load->path, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name)); | ||||
| BKE_sequence_calc_disp(scene, seq); | BKE_sequence_calc_disp(scene, seq); | ||||
| if (seq_load->name[0] == '\0') { | if (seq_load->name[0] == '\0') { | ||||
| BLI_strncpy(seq_load->name, se->name, sizeof(seq_load->name)); | BLI_strncpy(seq_load->name, se->name, sizeof(seq_load->name)); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 345 Lines • Show Last 20 Lines | |||||