21#include "RNA_prototypes.hh"
33 label_ = library.user_library->name;
36 label_ = library.extension_repo->name;
39 const char *name_cstr;
40 RNA_enum_name_gettexted(
41 rna_enum_asset_library_type_items, library.type, BLT_I18NCONTEXT_DEFAULT, &name_cstr);
71 "use_online_essentials",
73 IFACE_(
"Include Online Essentials"),
79 nullptr, RNA_UserAssetLibrary,
library.user_library);
87 row.
prop(&library_ptr,
105 panel->use_property_split_set(
true);
114 row.
label(
IFACE_(
"Defined by the extension repository"), ICON_STATUS_INFO);
122 col.
prop(&repo_ptr,
"use_access_token",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
137 col.
prop(&library_ptr,
"use_auth_token",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
140 if (!
library.user_library->auth_token) {
143 col.
prop(&library_ptr,
149 library.user_library->auth_token ? ICON_LOCKED : ICON_UNLOCKED,
156 if (
library.user_library->invalid_uuid) {
160 "Asset Library has an invalid identifier (invalid UUID). Either manually edit the "
161 "configuration file or regenerate it here.",
169 MEM_delete(
library.user_library->invalid_uuid);
170 library.user_library->invalid_uuid =
nullptr;
176 layout.
prop(&library_ptr,
"use_relative_path",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
#define USER_EXPERIMENTAL_TEST(userdef, member)
constexpr const char * c_str() const
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
@ ASSET_LIBRARY_USE_AUTH_TOKEN
@ ASSET_LIBRARY_PROJECT_DEFINED
@ ASSET_LIBRARY_USE_REMOTE_URL
@ ASSET_LIBRARY_ESSENTIALS
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
struct bUserExtensionRepo * BKE_preferences_extension_asset_library_repo_get(const struct UserDef *userdef, const struct bUserAssetLibrary *library) ATTR_NONNULL()
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
@ USER_EXTENSION_REPO_FLAG_USE_ACCESS_TOKEN_ASSET_LIBRARIES
@ USER_EXTENSION_REPO_FLAG_USE_ACCESS_TOKEN
void draw_active_library_settings(const bContext *C, ui::Layout &layout, const AnyAssetLibraryDefinition &library)
bUserAssetLibrary * user_library
bool is_extension_repo() const
bool supports_renaming() const override
bool rename(const bContext &C, StringRefNull new_name) override
AssetLibraryListItemCommon(const AnyAssetLibraryDefinition &library, const int index_in_list)
AnyAssetLibraryDefinition library
eUserExtensionRepo_Flag flag
void enabled_set(bool enabled)
void alignment_set(LayoutAlign alignment)
void label_multiline(StringRefNull label, int icon, FontStyleAlign align=UI_STYLE_TEXT_LEFT, int max_lines=0)
void label(StringRef name, int icon)
PanelLayout panel(const bContext *C, StringRef idname, bool default_closed)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void red_alert_set(bool red_alert)
void active_set(bool active)
Layout & column(bool align)
Button * button(StringRef name, int icon, std::function< void(bContext &)> func, std::optional< StringRef > tooltip=std::nullopt)