`append and reuse` is chosen as default in DNA but this enumpropertyitem isn't added to the array when `Non data block packing` is disabled in Developer tools (see `rna_preference_asset_libray_import_method_itemf`). To fix this, change default in DNA to `ASSET_IMPORT_PACK`. In case of "non packing", change import_method inside `asset_library_add()` function. Also introduce `rna_preference_asset_libray_import_method_default` so that "reset to default value" operator works correctly. Pull Request: https://projects.blender.org/blender/blender/pulls/147104
55 lines
1.0 KiB
C
55 lines
1.0 KiB
C
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup DNA
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "DNA_asset_types.h"
|
|
|
|
/* clang-format off */
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/** \name bUserAssetLibrary Struct
|
|
* \{ */
|
|
|
|
#define _DNA_DEFAULT_bUserAssetLibrary \
|
|
{ \
|
|
.import_method = ASSET_IMPORT_PACK, \
|
|
.flag = ASSET_LIBRARY_RELATIVE_PATH, \
|
|
}
|
|
|
|
/** \} */
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/** \name bUserExtensionRepo Struct
|
|
* \{ */
|
|
|
|
#define _DNA_DEFAULT_bUserExtensionRepo \
|
|
{ \
|
|
.name = {'\0'}, \
|
|
.module = {'\0'}, \
|
|
.custom_dirpath = {'\0'}, \
|
|
.remote_url = {'\0'}, \
|
|
.flag = 0, \
|
|
}
|
|
|
|
/** \} */
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/** \name bUserExtensionRepo Struct
|
|
* \{ */
|
|
|
|
#define _DNA_DEFAULT_bUserAssetShelfSettings \
|
|
{ \
|
|
.shelf_idname = {'\0'}, \
|
|
.enabled_catalog_paths = {NULL, NULL}, \
|
|
}
|
|
|
|
/** \} */
|
|
|
|
/* clang-format on */
|