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/editors/space_clip/space_clip.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/editors/space_clip/space_clip.c')
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 847cba32c69..b6dbda79a2d 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -24,6 +24,8 @@ #include <stdio.h> #include <string.h> +#include "DNA_defaults.h" + #include "DNA_mask_types.h" #include "DNA_movieclip_types.h" #include "DNA_scene_types.h" @@ -239,14 +241,7 @@ static SpaceLink *clip_create(const ScrArea *area, const Scene *scene) ARegion *region; SpaceClip *sc; - sc = MEM_callocN(sizeof(SpaceClip), "initclip"); - sc->spacetype = SPACE_CLIP; - sc->flag = SC_SHOW_MARKER_PATTERN | SC_SHOW_TRACK_PATH | SC_SHOW_GRAPH_TRACKS_MOTION | - SC_SHOW_GRAPH_FRAMES | SC_SHOW_ANNOTATION; - sc->zoom = 1.0f; - sc->path_length = 20; - sc->scopes.track_preview_height = 120; - sc->around = V3D_AROUND_CENTER_MEDIAN; + sc = DNA_struct_default_alloc(SpaceClip); /* header */ region = MEM_callocN(sizeof(ARegion), "header for clip"); |