Add DNA defaults for MovieClip.

This commit is contained in:
Bastien Montagne 2020-10-08 17:16:55 +02:00
parent 0eb9027987
commit d3ba60b132
Notes: blender-bot 2023-05-31 04:43:10 +02:00
Referenced by issue #80164, Missing DNA Defaults ("Reset to Default Value" sets to 0)
3 changed files with 61 additions and 0 deletions

View File

@ -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 */

View File

@ -26,6 +26,7 @@ blender_include_dirs(
../../../../intern/atomic
../../../../intern/guardedalloc
../../blenlib
../../imbuf
..
)

View File

@ -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),