Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Lenz <Amudtogal>2022-01-12 20:02:08 +0300
committerJulian Eisel <julian@blender.org>2022-01-12 20:04:48 +0300
commitbab47b60cb69c500869a3339654ad7d48dddf385 (patch)
tree35405db4dd5cc5f3830ff13f9bf0c4b74d4bf003 /source/blender/makesrna
parenta909ab984ce4007c0dbd70ee085c1d4d780c4014 (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/makesrna')
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt3
-rw-r--r--source/blender/makesrna/intern/rna_mask.c3
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c3
3 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 7e6d0aea2ee..f057d8e9d4c 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -203,6 +203,9 @@ set(INC
../../blenloader
${CMAKE_BINARY_DIR}/source/blender/makesdna/intern
+
+ # dna_type_offsets.h
+ ${CMAKE_CURRENT_BINARY_DIR}/../../makesdna/intern
)
set(INC_SYS
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index 9c90c209389..21bacf2e6be 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -23,6 +23,7 @@
#include "MEM_guardedalloc.h"
+#include "DNA_defaults.h"
#include "DNA_mask_types.h"
#include "DNA_object_types.h" /* SELECT */
#include "DNA_scene_types.h"
@@ -84,7 +85,7 @@ static void rna_Mask_update_parent(Main *bmain, Scene *scene, PointerRNA *ptr)
if (track) {
MovieTrackingMarker *marker = BKE_tracking_marker_get(track, clip_framenr);
float marker_pos_ofs[2], parmask_pos[2];
- MovieClipUser user = {0};
+ MovieClipUser user = *DNA_struct_default_get(MovieClipUser);
BKE_movieclip_user_set_frame(&user, scene->r.cfra);
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 03f4acdae79..2d4d5ee766f 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -32,6 +32,7 @@
#include "rna_internal.h"
+#include "DNA_defaults.h"
#include "DNA_movieclip_types.h"
#include "DNA_object_types.h" /* SELECT */
#include "DNA_scene_types.h"
@@ -609,7 +610,7 @@ static MovieTrackingTrack *add_track_to_base(
MovieClip *clip, MovieTracking *tracking, ListBase *tracksbase, const char *name, int frame)
{
int width, height;
- MovieClipUser user = {0};
+ MovieClipUser user = *DNA_struct_default_get(MovieClipUser);
MovieTrackingTrack *track;
user.framenr = 1;