|
Blender V4.3
|
Go to the source code of this file.
Name of the asset library added by default. Needs translation with DATA_() still.
Definition at line 29 of file BKE_preferences.h.
Referenced by BKE_preferences_asset_library_default_add(), and blo_do_versions_userdef().
| struct bUserAssetLibrary * BKE_preferences_asset_library_add | ( | struct UserDef * | userdef, |
| const char * | name, | ||
| const char * | dirpath ) |
Definition at line 40 of file preferences.cc.
References UserDef::asset_libraries, BKE_preferences_asset_library_name_set(), BLI_addtail(), bUserAssetLibrary::dirpath, DNA_struct_default_alloc, and STRNCPY.
Referenced by BKE_preferences_asset_library_default_add(), preferences_asset_library_add_exec(), and blender::asset_system::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib().
| struct bUserAssetLibrary * BKE_preferences_asset_library_containing_path | ( | const struct UserDef * | userdef, |
| const char * | path ) |
Return the bUserAssetLibrary that contains the given file/directory path. The given path can be the library's top-level directory, or any path inside that directory.
When more than one asset libraries match, the first matching one is returned (no smartness when there nested asset libraries).
Return NULL when no such asset library is found.
Referenced by AS_asset_library_find_suitable_root_path_from_path(), blender::ed::asset::asset_bundle_install_poll(), blender::bke::asset_edit_weak_reference_from_id(), and blender::bke::asset_link_id().
| void BKE_preferences_asset_library_default_add | ( | struct UserDef * | userdef | ) |
Definition at line 113 of file preferences.cc.
References BKE_appdir_folder_documents(), BKE_preferences_asset_library_add(), BKE_PREFS_ASSET_LIBRARY_DEFAULT_NAME, BLI_path_join, DATA_, bUserAssetLibrary::dirpath, FILE_MAXDIR, and N_.
Referenced by BKE_blendfile_userdef_from_defaults(), and blo_do_versions_userdef().
| struct bUserAssetLibrary * BKE_preferences_asset_library_find_by_name | ( | const struct UserDef * | userdef, |
| const char * | name ) |
| struct bUserAssetLibrary * BKE_preferences_asset_library_find_index | ( | const struct UserDef * | userdef, |
| int | index ) |
Referenced by filelist_compare_asset_libraries(), fileselect_refresh_asset_params(), blender::asset_system::AssetLibraryService::find_custom_asset_library_from_library_ref(), blender::ed::sculpt_paint::get_asset_library_from_prop(), blender::ed::asset::library_reference_from_enum_value(), blender::ed::asset::library_reference_to_enum_value(), and blender::ed::asset::selected_asset_library().
| int BKE_preferences_asset_library_get_index | ( | const struct UserDef * | userdef, |
| const struct bUserAssetLibrary * | library ) |
| void BKE_preferences_asset_library_name_set | ( | struct UserDef * | userdef, |
| struct bUserAssetLibrary * | library, | ||
| const char * | name ) |
Definition at line 63 of file preferences.cc.
References UserDef::asset_libraries, BLI_uniquename(), bUserAssetLibrary::name, offsetof, and STRNCPY_UTF8.
Referenced by BKE_preferences_asset_library_add(), and blo_do_versions_userdef().
| void BKE_preferences_asset_library_path_set | ( | struct bUserAssetLibrary * | library, |
| const char * | path ) |
Set the library path, ensuring it is pointing to a directory. Single blend files can only act as "Current File" library; libraries on disk should always be directories. If the path does not exist, that's fine; it can created as directory if necessary later.
Definition at line 76 of file preferences.cc.
References BLI_is_file(), BLI_path_parent_dir(), bUserAssetLibrary::dirpath, and STRNCPY.
| void BKE_preferences_asset_library_remove | ( | struct UserDef * | userdef, |
| struct bUserAssetLibrary * | library ) |
Unlink and free a library preference member.
Definition at line 58 of file preferences.cc.
References UserDef::asset_libraries, and BLI_freelinkN().
Referenced by preferences_asset_library_remove_exec(), and blender::asset_system::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib().
| bool BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled | ( | UserDef * | userdef, |
| const char * | shelf_idname, | ||
| const char * | catalog_path ) |
Enable a catalog path for a asset shelf identified by shelf_idname. Will create the shelf settings in the Preferences if necessary.
Definition at line 569 of file preferences.cc.
References asset_shelf_settings_ensure(), BKE_asset_catalog_path_list_add_path(), and BKE_preferences_asset_shelf_settings_is_catalog_path_enabled().
Referenced by BKE_blendfile_userdef_from_defaults(), blo_do_versions_userdef(), blender::ed::asset::shelf::settings_set_catalog_path_enabled(), and blender::ed::sculpt_paint::show_catalog_in_asset_shelf().
| bUserAssetShelfSettings * BKE_preferences_asset_shelf_settings_get | ( | const UserDef * | userdef, |
| const char * | shelf_idname ) |
Definition at line 548 of file preferences.cc.
References UserDef::asset_shelves_settings, BLI_findstring(), and offsetof.
Referenced by asset_shelf_settings_ensure(), BKE_preferences_asset_shelf_settings_is_catalog_path_enabled(), and blender::ed::asset::shelf::get_enabled_catalog_path_list().
| bool BKE_preferences_asset_shelf_settings_is_catalog_path_enabled | ( | const UserDef * | userdef, |
| const char * | shelf_idname, | ||
| const char * | catalog_path ) |
Definition at line 557 of file preferences.cc.
References BKE_asset_catalog_path_list_has_path(), and BKE_preferences_asset_shelf_settings_get().
Referenced by BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled().
| void BKE_preferences_extension_remote_to_name | ( | const char * | remote_url, |
| char | name[64] ) |
Set a name based on a URL, e.g. https://www.example.com/path -> www.example.com.
Referenced by preferences_extension_repo_add_exec().
| bUserExtensionRepo * BKE_preferences_extension_repo_add | ( | UserDef * | userdef, |
| const char * | name, | ||
| const char * | module, | ||
| const char * | custom_dirpath ) |
Definition at line 161 of file preferences.cc.
References BKE_preferences_extension_repo_module_set(), BKE_preferences_extension_repo_name_set(), BLI_addtail(), BLI_path_cmp, BLI_path_normalize(), BLI_path_slash_rstrip(), bUserExtensionRepo::custom_dirpath, DNA_struct_default_alloc, UserDef::extension_repos, LISTBASE_FOREACH, module, and STRNCPY.
Referenced by BKE_preferences_extension_repo_add_default_remote(), BKE_preferences_extension_repo_add_default_system(), BKE_preferences_extension_repo_add_default_user(), and preferences_extension_repo_add_exec().
| bUserExtensionRepo * BKE_preferences_extension_repo_add_default_remote | ( | UserDef * | userdef | ) |
Definition at line 200 of file preferences.cc.
References BKE_preferences_extension_repo_add(), bUserExtensionRepo::flag, bUserExtensionRepo::remote_url, STRNCPY, USER_EXTENSION_REPO_FLAG_SYNC_ON_STARTUP, and USER_EXTENSION_REPO_FLAG_USE_REMOTE_URL.
Referenced by BKE_preferences_extension_repo_add_defaults_all(), and blo_do_versions_userdef().
| bUserExtensionRepo * BKE_preferences_extension_repo_add_default_system | ( | UserDef * | userdef | ) |
Definition at line 219 of file preferences.cc.
References BKE_preferences_extension_repo_add(), bUserExtensionRepo::source, and USER_EXTENSION_REPO_SOURCE_SYSTEM.
Referenced by BKE_preferences_extension_repo_add_defaults_all(), and blo_do_versions_userdef().
| bUserExtensionRepo * BKE_preferences_extension_repo_add_default_user | ( | UserDef * | userdef | ) |
Definition at line 212 of file preferences.cc.
References BKE_preferences_extension_repo_add().
Referenced by BKE_preferences_extension_repo_add_defaults_all(), and blo_do_versions_userdef().
| void BKE_preferences_extension_repo_add_defaults_all | ( | UserDef * | userdef | ) |
Create all default repositories, only use when repositories are empty.
Definition at line 226 of file preferences.cc.
References BKE_preferences_extension_repo_add_default_remote(), BKE_preferences_extension_repo_add_default_system(), BKE_preferences_extension_repo_add_default_user(), BLI_assert, BLI_listbase_is_empty(), and UserDef::extension_repos.
Referenced by BKE_blendfile_userdef_from_defaults().
| void BKE_preferences_extension_repo_custom_dirpath_set | ( | bUserExtensionRepo * | repo, |
| const char * | path ) |
Definition at line 282 of file preferences.cc.
References bUserExtensionRepo::custom_dirpath, and STRNCPY.
| size_t BKE_preferences_extension_repo_dirpath_get | ( | const bUserExtensionRepo * | repo, |
| char * | dirpath, | ||
| int | dirpath_maxncpy ) |
Definition at line 287 of file preferences.cc.
References BKE_appdir_folder_id(), BKE_appdir_folder_id_user_notest(), BLENDER_SYSTEM_EXTENSIONS, BLENDER_USER_EXTENSIONS, BLI_path_join, BLI_strncpy_rlen(), bUserExtensionRepo::custom_dirpath, bUserExtensionRepo::flag, bUserExtensionRepo::module, bUserExtensionRepo::source, USER_EXTENSION_REPO_FLAG_USE_CUSTOM_DIRECTORY, USER_EXTENSION_REPO_FLAG_USE_REMOTE_URL, USER_EXTENSION_REPO_SOURCE_SYSTEM, and USER_EXTENSION_REPO_SOURCE_USER.
Referenced by preferences_extension_repo_remove_exec(), and preferences_extension_repo_remove_invoke().
| bUserExtensionRepo * BKE_preferences_extension_repo_find_by_module | ( | const UserDef * | userdef, |
| const char * | module ) |
Definition at line 338 of file preferences.cc.
References BLI_findstring(), UserDef::extension_repos, module, and offsetof.
| bUserExtensionRepo * BKE_preferences_extension_repo_find_by_remote_url_prefix | ( | const UserDef * | userdef, |
| const char * | remote_url_full, | ||
| const bool | only_enabled ) |
Using a full URL/remote path to find a repository that shares its prefix.
Definition at line 361 of file preferences.cc.
References BKE_preferences_extension_repo_remote_scheme_end(), ELEM, UserDef::extension_repos, LISTBASE_FOREACH, url_char_is_delimiter(), USER_EXTENSION_REPO_FLAG_DISABLED, and USER_EXTENSION_REPO_FLAG_USE_REMOTE_URL.
Referenced by drop_extension_url_poll().
| bUserExtensionRepo * BKE_preferences_extension_repo_find_index | ( | const UserDef * | userdef, |
| int | index ) |
Definition at line 333 of file preferences.cc.
References BLI_findlink(), and UserDef::extension_repos.
| int BKE_preferences_extension_repo_get_index | ( | const UserDef * | userdef, |
| const bUserExtensionRepo * | repo ) |
Definition at line 501 of file preferences.cc.
References BLI_findindex(), and UserDef::extension_repos.
| bool BKE_preferences_extension_repo_module_is_valid | ( | const bUserExtensionRepo * | repo | ) |
Check the module name is valid, while this should always be the case, use this as an additional safely check before performing destructive operations such as recursive file removal to prevent file/memory corruption causing user data loss.
Definition at line 267 of file preferences.cc.
References BLI_strnlen(), bUserExtensionRepo::module, and strncpy_py_module().
Referenced by preferences_extension_repo_remove_exec().
| void BKE_preferences_extension_repo_module_set | ( | UserDef * | userdef, |
| bUserExtensionRepo * | repo, | ||
| const char * | module ) |
Definition at line 251 of file preferences.cc.
References BLI_uniquename(), UserDef::extension_repos, bUserExtensionRepo::module, module, offsetof, STRNCPY, and strncpy_py_module().
Referenced by BKE_preferences_extension_repo_add().
| void BKE_preferences_extension_repo_name_set | ( | UserDef * | userdef, |
| bUserExtensionRepo * | repo, | ||
| const char * | name ) |
Definition at line 234 of file preferences.cc.
References BLI_uniquename(), UserDef::extension_repos, bUserExtensionRepo::name, offsetof, and STRNCPY_UTF8.
Referenced by BKE_preferences_extension_repo_add().
| void BKE_preferences_extension_repo_read_data | ( | struct BlendDataReader * | reader, |
| bUserExtensionRepo * | repo ) |
Definition at line 507 of file preferences.cc.
References bUserExtensionRepo::access_token, and BLO_read_string().
Referenced by read_userdef().
| int BKE_preferences_extension_repo_remote_scheme_end | ( | const char * | url | ) |
Skip the https or http part of a URL https://, return zero if none is found.
Definition at line 419 of file preferences.cc.
References ARRAY_SIZE.
Referenced by BKE_preferences_extension_remote_to_name(), BKE_preferences_extension_repo_find_by_remote_url_prefix(), and drop_extension_url_poll().
| void BKE_preferences_extension_repo_remove | ( | UserDef * | userdef, |
| bUserExtensionRepo * | repo ) |
Definition at line 195 of file preferences.cc.
References BLI_freelinkN(), and UserDef::extension_repos.
Referenced by blo_do_versions_userdef(), and preferences_extension_repo_remove_exec().
| size_t BKE_preferences_extension_repo_user_dirpath_get | ( | const bUserExtensionRepo * | repo, |
| char * | dirpath, | ||
| const int | dirpath_maxncpy ) |
Returns a user editable directory associated with this repository. Needed so extensions may have local data.
Definition at line 321 of file preferences.cc.
References BKE_appdir_folder_id_user_notest(), BLENDER_USER_EXTENSIONS, BLI_path_join, and bUserExtensionRepo::module.
Referenced by preferences_extension_repo_remove_exec(), and preferences_extension_repo_remove_invoke().
| void BKE_preferences_extension_repo_write_data | ( | struct BlendWriter * | writer, |
| const bUserExtensionRepo * | repo ) |
Definition at line 514 of file preferences.cc.
References bUserExtensionRepo::access_token, and BLO_write_string().
Referenced by write_userdef().