diff options
author | Bastien Montagne <bastien@blender.org> | 2020-10-08 18:16:55 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-10-08 18:19:05 +0300 |
commit | d3ba60b132631187d4b8a9343fbe19656b92cc89 (patch) | |
tree | 8e0df8110e11dd9416ab8af476fbdd83356644ad | |
parent | 0eb902798789835dd651d3f5d2316d01c4f00736 (diff) |
Add DNA defaults for MovieClip.
-rw-r--r-- | source/blender/makesdna/DNA_movieclip_defaults.h | 50 | ||||
-rw-r--r-- | source/blender/makesdna/intern/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_defaults.c | 10 |
3 files changed, 61 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_movieclip_defaults.h b/source/blender/makesdna/DNA_movieclip_defaults.h new file mode 100644 index 00000000000..4aa1bd779c2 --- /dev/null +++ b/source/blender/makesdna/DNA_movieclip_defaults.h @@ -0,0 +1,50 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup DNA + */ + +#pragma once + +/* Struct members on own line. */ +/* clang-format off */ + +/* -------------------------------------------------------------------- */ +/** \name MovieClip Struct + * \{ */ + +#define _DNA_DEFAULT_MovieClipProxy \ + { \ + .build_size_flag = IMB_PROXY_25, \ + .build_tc_flag = IMB_TC_RECORD_RUN | IMB_TC_FREE_RUN | \ + IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN | IMB_TC_RECORD_RUN_NO_GAPS, \ + .quality = 90, \ + } + + +#define _DNA_DEFAULT_MovieClip \ + { \ + .aspx = 1.0f, \ + .aspy = 1.0f, \ + .proxy = _DNA_DEFAULT_MovieClipProxy, \ + .start_frame = 1, \ + .frame_offset = 0, \ + } + +/** \} */ + +/* clang-format on */ diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 57a68720160..c2781385455 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -26,6 +26,7 @@ blender_include_dirs( ../../../../intern/atomic ../../../../intern/guardedalloc ../../blenlib + ../../imbuf .. ) diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c index ce6bc82e326..953484992da 100644 --- a/source/blender/makesdna/intern/dna_defaults.c +++ b/source/blender/makesdna/intern/dna_defaults.c @@ -80,6 +80,8 @@ #include "BLI_memarena.h" #include "BLI_utildefines.h" +#include "IMB_imbuf.h" + #include "DNA_defaults.h" #include "DNA_armature_types.h" @@ -100,6 +102,7 @@ #include "DNA_mesh_types.h" #include "DNA_meta_types.h" #include "DNA_modifier_types.h" +#include "DNA_movieclip_types.h" #include "DNA_object_types.h" #include "DNA_pointcloud_types.h" #include "DNA_scene_types.h" @@ -126,6 +129,7 @@ #include "DNA_mesh_defaults.h" #include "DNA_meta_defaults.h" #include "DNA_modifier_defaults.h" +#include "DNA_movieclip_defaults.h" #include "DNA_object_defaults.h" #include "DNA_pointcloud_defaults.h" #include "DNA_scene_defaults.h" @@ -183,6 +187,9 @@ SDNA_DEFAULT_DECL_STRUCT(Mesh); /* DNA_meta_defaults.h */ SDNA_DEFAULT_DECL_STRUCT(MetaBall); +/* DNA_movieclip_defaults.h */ +SDNA_DEFAULT_DECL_STRUCT(MovieClip); + /* DNA_object_defaults.h */ SDNA_DEFAULT_DECL_STRUCT(Object); @@ -344,6 +351,9 @@ const void *DNA_default_table[SDNA_TYPE_MAX] = { /* DNA_meta_defaults.h */ SDNA_DEFAULT_DECL(MetaBall), + /* DNA_movieclip_defaults.h */ + SDNA_DEFAULT_DECL(MovieClip), + /* DNA_object_defaults.h */ SDNA_DEFAULT_DECL(Object), |