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:
authorCampbell Barton <ideasman42@gmail.com>2019-09-09 19:14:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-09 20:27:27 +0300
commitb24fdaed65b293c743f2719bfd0861c38660da85 (patch)
tree63b8489fe3b4cf5a6930d6f4796bd3dc0889cd5c /source/blender/makesdna/intern/dna_defaults.c
parent6be3348505cef0bcf0a11eda1cf253c113e2d64a (diff)
DNA: add theme & preferences to defaults
Use existing theme & preferences for defaults.
Diffstat (limited to 'source/blender/makesdna/intern/dna_defaults.c')
-rw-r--r--source/blender/makesdna/intern/dna_defaults.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c
index 327411ab17f..d9ee42026f8 100644
--- a/source/blender/makesdna/intern/dna_defaults.c
+++ b/source/blender/makesdna/intern/dna_defaults.c
@@ -36,6 +36,8 @@
* - #DNA_struct_default_alloc
*
* These access the struct table #DNA_default_table using the struct number.
+ *
+ * \note Struct members only define their members (pointers are left as NULL set).
*/
#include <stdio.h>
@@ -59,6 +61,13 @@
const Scene DNA_DEFAULT_Scene = _DNA_DEFAULT_Scene;
const ToolSettings DNA_DEFAULT_ToolSettings = _DNA_DEFAULT_ToolSettings;
+/* Reuse existing definitions. */
+extern const struct UserDef U_default;
+#define DNA_DEFAULT_UserDef U_default
+
+extern const bTheme U_theme_default;
+#define DNA_DEFAULT_bTheme U_theme_default
+
/**
* Prevent assigning the wrong struct types since all elements in #DNA_default_table are `void *`.
*/
@@ -97,6 +106,12 @@ const void *DNA_default_table[SDNA_TYPE_MAX] = {
SDNA_DEFAULT_DECL_EX(GP_Sculpt_Settings, ToolSettings.gp_sculpt),
SDNA_DEFAULT_DECL_EX(GP_Sculpt_Guide, ToolSettings.gp_sculpt.guide),
+ /* DNA_userdef_types.h */
+ SDNA_DEFAULT_DECL(UserDef),
+ SDNA_DEFAULT_DECL(bTheme),
+ SDNA_DEFAULT_DECL_EX(UserDef_SpaceData, UserDef.space_data),
+ SDNA_DEFAULT_DECL_EX(WalkNavigation, UserDef.walk_navigation),
+
/* DNA_view3d_defaults.h */
SDNA_DEFAULT_DECL_EX(View3DShading, Scene.display.shading),
SDNA_DEFAULT_DECL_EX(View3DCursor, Scene.cursor),