diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-03-02 14:08:16 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-03-02 14:23:04 +0300 |
commit | bbb1936411a5f98f5a49ed0d63bcf1a547cbdb59 (patch) | |
tree | 87a9b39a54828a4f4447f1d41903fa70111cb981 /source/blender/sequencer/intern/render.c | |
parent | b279fef85d1a561ceb71e2cdce458bd44b4d853a (diff) |
VSE: Refactor VSE strip loading code
Isolate RNA and operator logic from functions that create strips.
- Operator specific code was removed from `SeqLoadInfo` structure and
`SEQ_add_*` functions.
- Strip loading code was removed from RNA and operator functions.
- `SEQ_add_*` API was unified to work on `SeqLoadData` struct.
Only exception is image strip, which require files to be loaded
separately to strip creation itself. This is not ideal, but I think
it's acceptable.
- Some functions and variables were refactored so the code reads
better.
There are minor functional changes (coincidental bugfixes):
- Operator errors are reported per-strip. Previously they were not
reported at all?
- `new_sound()` RNA API function now create sound with length of 1
if source file does not exist. Previously it created strip with
length of 0.
- Replace selection operator property wasn't working correctly.
Fixed in this patch.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9760
Diffstat (limited to 'source/blender/sequencer/intern/render.c')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index e9de73bc093..f1a0a7db13b 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -203,34 +203,6 @@ void SEQ_render_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4 } } -void SEQ_render_init_colorspace(Sequence *seq) -{ - if (seq->strip && seq->strip->stripdata) { - char name[FILE_MAX]; - ImBuf *ibuf; - - BLI_join_dirfile(name, sizeof(name), seq->strip->dir, seq->strip->stripdata->name); - BLI_path_abs(name, BKE_main_blendfile_path_from_global()); - - /* initialize input color space */ - if (seq->type == SEQ_TYPE_IMAGE) { - ibuf = IMB_loadiffname( - name, IB_test | IB_alphamode_detect, seq->strip->colorspace_settings.name); - - /* byte images are default to straight alpha, however sequencer - * works in premul space, so mark strip to be premultiplied first - */ - seq->alpha_mode = SEQ_ALPHA_STRAIGHT; - if (ibuf) { - if (ibuf->flags & IB_alphamode_premul) { - seq->alpha_mode = IMA_ALPHA_PREMUL; - } - - IMB_freeImBuf(ibuf); - } - } - } -} /** \} */ /* -------------------------------------------------------------------- */ |