diff options
author | Simon Lenz <Amudtogal> | 2022-01-12 20:02:08 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-01-12 20:04:48 +0300 |
commit | bab47b60cb69c500869a3339654ad7d48dddf385 (patch) | |
tree | 35405db4dd5cc5f3830ff13f9bf0c4b74d4bf003 /source/blender/sequencer/intern/render.c | |
parent | a909ab984ce4007c0dbd70ee085c1d4d780c4014 (diff) |
DNA: Add space clip editor defaults
This is my attempt of adding defaults for the space clip editor struct
(in line with https://developer.blender.org/T80164).
It adds the default allocation for `SpaceClip` and
`node_composite_movieclip.cc`. This also solves the error below (for
C++ files using the DNA_default_alloc), which was put forward by
Sergey Sharybin.
Differential Revision: https://developer.blender.org/D13367
Reviewed by: Julian Eisel
Diffstat (limited to 'source/blender/sequencer/intern/render.c')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 9f4e07820fa..482425e70d3 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -29,6 +29,7 @@ #include "MEM_guardedalloc.h" #include "DNA_anim_types.h" +#include "DNA_defaults.h" #include "DNA_mask_types.h" #include "DNA_scene_types.h" #include "DNA_sequence_types.h" @@ -1188,15 +1189,13 @@ static ImBuf *seq_render_movieclip_strip(const SeqRenderData *context, bool *r_is_proxy_image) { ImBuf *ibuf = NULL; - MovieClipUser user; + MovieClipUser user = *DNA_struct_default_get(MovieClipUser); IMB_Proxy_Size psize = SEQ_rendersize_to_proxysize(context->preview_render_size); if (!seq->clip) { return NULL; } - memset(&user, 0, sizeof(MovieClipUser)); - BKE_movieclip_user_set_frame(&user, frame_index + seq->anim_startofs + seq->clip->start_frame); user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL; |