81 "Geometry/Operations",
112 "Utilities/Rotation",
113 "Utilities/Deprecated",
165 C,
"asset_catalog_path");
180 bool add_separator =
true;
185 add_separator =
false;
189 "NODE_OT_add_group_asset",
190 IFACE_(asset->get_name().c_str()),
207 add_separator =
false;
229 "NODE_OT_add_group_asset",
230 IFACE_(asset->get_name().c_str()),
255 if (
tree.catalogs.is_empty() && loading_finished) {
261 if (!loading_finished) {
262 uiItemL(layout,
IFACE_(
"Loading Asset Libraries"), ICON_INFO);
269 asset::draw_menu_for_catalog(item,
"NODE_MT_node_add_catalog_assets", *layout);
273 if (!
tree.unassigned_assets.is_empty()) {
275 uiItemM(layout,
"NODE_MT_node_add_unassigned_assets",
IFACE_(
"Unassigned"), ICON_FILE_HIDDEN);
282 STRNCPY(type.idname,
"NODE_MT_node_add_catalog_assets");
293 STRNCPY(type.idname,
"NODE_MT_node_add_unassigned_assets");
298 type.description =
N_(
299 "Node group assets not assigned to a catalog.\n"
300 "Catalogs can be assigned in the Asset Browser");
307 STRNCPY(type.idname,
"NODE_MT_node_add_root_catalogs");
Main runtime representation of an asset.
IDProperty * BKE_asset_metadata_idprop_find(const AssetMetaData *asset_data, const char *name) ATTR_WARN_UNUSED_RESULT
SpaceNode * CTX_wm_space_node(const bContext *C)
std::optional< blender::StringRefNull > CTX_data_string_get(const bContext *C, const char *member)
#define STRNCPY(dst, src)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, PointerRNA *r_opptr)
void uiItemS(uiLayout *layout)
void uiItemMContents(uiLayout *layout, const char *menuname)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiLayoutSetContextString(uiLayout *layout, const char *name, blender::StringRef value)
void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
@ WM_OP_INVOKE_REGION_WIN
bool contains_as(const ForwardKey &key) const
constexpr bool is_empty() const
const std::string & str() const
void foreach_child(ItemIterFn callback) const
AssetCatalogPath catalog_path() const
bool has_children() const
AssetLibraryReference all_library_reference()
void all_library_reload_catalogs_if_dirty()
bool is_loaded(const AssetLibraryReference *library_reference)
void asset_reading_region_listen_fn(const wmRegionListenerParams *params)
AssetItemTree build_filtered_all_catalog_tree(const AssetLibraryReference &library_ref, const bContext &C, const AssetFilterSettings &filter_settings, FunctionRef< bool(const AssetMetaData &)> meta_data_filter={})
void draw_menu_for_catalog(const asset_system::AssetCatalogTreeItem &item, const StringRefNull menu_name, uiLayout &layout)
void operator_asset_reference_props_set(const asset_system::AssetRepresentation &asset, PointerRNA &ptr)
static bool all_loading_finished()
static Set< StringRef > get_builtin_menus(const int tree_type)
MenuType add_catalog_assets_menu_type()
MenuType add_unassigned_assets_menu_type()
static void node_add_unassigned_assets_draw(const bContext *C, Menu *menu)
void ui_template_node_asset_menu_items(uiLayout &layout, const bContext &C, StringRef catalog_path)
MenuType add_root_catalogs_menu_type()
static void node_add_catalog_assets_draw(const bContext *C, Menu *menu)
static asset::AssetItemTree build_catalog_tree(const bContext &C, const bNodeTree &node_tree)
static void add_root_catalogs_draw(const bContext *C, Menu *menu)
static bool node_add_menu_poll(const bContext *C, MenuType *)
SpaceNode_Runtime * runtime
struct bNodeTree * edittree
std::shared_ptr< asset::AssetItemTree > assets_for_menu