90 bool add_separator =
true;
95 add_separator =
false;
97 PointerRNA op_ptr = layout.
op(
"SEQUENCER_OT_add_scene_strip_from_scene_asset",
108 add_separator =
false;
150 "SEQUENCER_OT_scene_strip_add_new",
IFACE_(
"Empty Scene"), ICON_ADD);
164 layout.
label(
IFACE_(
"Assets"), ICON_ASSET_MANAGER);
167 if (!loading_finished) {
168 layout.
label(
IFACE_(
"Loading Asset Libraries"), ICON_STATUS_INFO);
176 layout.
menu_contents(
"SEQUENCER_MT_scene_add_unassigned_assets");
180 layout.
label(
IFACE_(
"No scene assets."), ICON_NONE);
187 const int scenes_len = bmain->
scenes.count();
188 if (scenes_len == 1) {
189 layout.
label(
IFACE_(
"Scene Strip"), ICON_SCENE_DATA);
190 layout.
label(
IFACE_(
"No other scenes."), ICON_NONE);
193 layout.
label(
IFACE_(
"Scene Strip"), ICON_SCENE_DATA);
196 for (
const auto [i, scene] : bmain->
scenes.enumerate()) {
197 if (&scene == active_scene) {
200 if (scene.id.asset_data) {
203 PointerRNA op_ptr = layout.
op(
"SEQUENCER_OT_scene_strip_add",
216 STRNCPY(type.
idname,
"SEQUENCER_MT_scene_add_catalog_assets");
227 STRNCPY(type.
idname,
"SEQUENCER_MT_scene_add_unassigned_assets");
233 "Scene assets not assigned to a catalog.\n"
234 "Catalogs can be assigned in the Asset Browser");
Main runtime representation of an asset.
constexpr bool is_empty() const
void foreach_child(ItemIterFn callback) const
bool has_children() const
void foreach_root_item(ItemIterFn callback) const
const AssetCatalogTreeItem * find_item(const AssetCatalogPath &path) 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)
void draw_menu_for_catalog(const asset_system::AssetCatalogTreeItem &item, const StringRefNull menu_name, ui::Layout &layout)
AssetItemTree build_filtered_all_catalog_tree(const AssetLibraryReference &library_ref, const bContext &C, const AssetFilterSettings &filter_settings, FunctionRef< bool(const AssetMetaData &)> meta_data_filter={}, const std::optional< StringRef > skip_prefix=std::nullopt)
void operator_asset_reference_props_set(const asset_system::AssetRepresentation &asset, PointerRNA &ptr)
static void sequencer_add_scene_draw(const bContext *C, Menu *menu)
static bool all_loading_finished()
static bool sequencer_add_menu_poll(const bContext *C, MenuType *)
MenuType add_scene_menu_type()
static void sequencer_add_catalog_assets_draw(const bContext *C, Menu *menu)
MenuType add_unassigned_assets_menu_type()
static void sequencer_add_unassigned_assets_draw(const bContext *C, Menu *menu)
MenuType add_catalog_assets_menu_type()
static asset::AssetItemTree build_catalog_tree(const bContext &C)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
char * STRNCPY(char(&dst)[N], const char *src)
Scene * CTX_data_sequencer_scene(const bContext *C)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
@ SEQ_VIEW_SEQUENCE_PREVIEW
std::optional< StringRefNull > CTX_data_string_get(const bContext *C, const char *member)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
Main * CTX_data_main(const bContext *C)
ListBaseT< Scene > scenes
ed::vse::SpaceSeq_Runtime * runtime
MultiValueMap< asset_system::AssetCatalogPath, asset_system::AssetRepresentation * > assets_per_path
Vector< asset_system::AssetRepresentation * > unassigned_assets
asset_system::AssetCatalogTree catalogs
std::shared_ptr< asset::AssetItemTree > assets_for_menu
void operator_context_set(wm::OpCallContext opcontext)
void label(StringRef name, int icon)
void menu_contents(StringRef menuname)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)