- diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
- index 679496ee783..ac9fcd9c80a 100644
- --- a/source/blender/CMakeLists.txt
- +++ b/source/blender/CMakeLists.txt
- @@ -120,6 +120,7 @@ set(SRC_DNA_DEFAULTS_INC
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_space_defaults.h
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_speaker_defaults.h
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_texture_defaults.h
- + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_userdef_defaults.h
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_vec_defaults.h
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_view3d_defaults.h
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_volume_defaults.h
- diff --git a/source/blender/blenkernel/intern/preferences.c b/source/blender/blenkernel/intern/preferences.c
- index 02169cd4535..771cfa6f51d 100644
- --- a/source/blender/blenkernel/intern/preferences.c
- +++ b/source/blender/blenkernel/intern/preferences.c
- @@ -46,7 +46,6 @@ bUserAssetLibrary *BKE_preferences_asset_library_add(UserDef *userdef,
- if (path) {
- BLI_strncpy(library->path, path, sizeof(library->path));
- }
- - library->import_method = ASSET_IMPORT_APPEND_REUSE;
- return library;
- }
- diff --git a/source/blender/makesdna/DNA_userdef_defaults.h b/source/blender/makesdna/DNA_userdef_defaults.h
- new file mode 100644
- index 00000000000..500abd73696
- --- /dev/null
- +++ b/source/blender/makesdna/DNA_userdef_defaults.h
- @@ -0,0 +1,28 @@
- +/* SPDX-License-Identifier: GPL-2.0-or-later */
- +
- +/** \file
- + * \ingroup DNA
- + */
- +
- +#pragma once
- +
- +#include "DNA_asset_types.h"
- +
- +/* Struct members on own line. */
- +/* clang-format off */
- +
- +/* -------------------------------------------------------------------- */
- +/** \name bUserAssetLibrary Struct
- + * \{ */
- +
- +#define _DNA_DEFAULT_bUserAssetLibrary \
- + { \
- + .import_method = ASSET_IMPORT_APPEND_REUSE, \
- + .flag = ASSET_LIBRARY_RELATIVE_PATH, \
- + }
- +
- +/** \} */
- +
- +/* clang-format off */
- +
- +/** \} */
- diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c
- index 9ad3fd27974..456306d196d 100644
- --- a/source/blender/makesdna/intern/dna_defaults.c
- +++ b/source/blender/makesdna/intern/dna_defaults.c
- @@ -132,6 +132,7 @@
- #include "DNA_space_defaults.h"
- #include "DNA_speaker_defaults.h"
- #include "DNA_texture_defaults.h"
- +#include "DNA_userdef_defaults.h"
- #include "DNA_volume_defaults.h"
- #include "DNA_world_defaults.h"
- @@ -222,6 +223,9 @@ SDNA_DEFAULT_DECL_STRUCT(Speaker);
- /* DNA_texture_defaults.h */
- SDNA_DEFAULT_DECL_STRUCT(Tex);
- +/* DNA_userdef_types.h */
- +SDNA_DEFAULT_DECL_STRUCT(bUserAssetLibrary);
- +
- /* DNA_view3d_defaults.h */
- SDNA_DEFAULT_DECL_STRUCT(View3D);
- @@ -461,6 +465,7 @@ const void *DNA_default_table[SDNA_TYPE_MAX] = {
- SDNA_DEFAULT_DECL_EX(UserDef_SpaceData, UserDef.space_data),
- SDNA_DEFAULT_DECL_EX(UserDef_FileSpaceData, UserDef.file_space_data),
- SDNA_DEFAULT_DECL_EX(WalkNavigation, UserDef.walk_navigation),
- + SDNA_DEFAULT_DECL(bUserAssetLibrary),
- /* DNA_view3d_defaults.h */
- SDNA_DEFAULT_DECL(View3D),
Undefined
By: Guest | Date: Apr 25 2023 18:43 | Format: None | Expires: never | Size: 3.07 KB | Hits: 225
Latest pastes
9 hours ago
1 days ago
2 days ago
2 days ago
3 days ago