Blender V4.3
blender::ed::asset Namespace Reference

Namespaces

namespace  index
 
namespace  list
 
namespace  shelf
 

Classes

class  AssetClearHelper
 
struct  AssetFilterSettings
 
struct  AssetItemTree
 
class  AssetMarkHelper
 
class  AssetTemporaryIDConsumer
 
struct  CatalogUniqueNameFnData
 
struct  FileCheckCallbackInfo
 
struct  IDVecStats
 

Functions

void catalogs_save_from_main_path (asset_system::AssetLibrary *library, const Main *bmain)
 
void catalogs_set_save_catalogs_when_file_is_saved (bool should_save)
 
bool catalogs_get_save_catalogs_when_file_is_saved ()
 
bool catalogs_read_only (const asset_system::AssetLibrary &library)
 
asset_system::AssetCatalogcatalog_add (asset_system::AssetLibrary *library, StringRefNull name, StringRef parent_path=nullptr)
 
void catalog_remove (asset_system::AssetLibrary *library, const asset_system::CatalogID &catalog_id)
 
void catalog_rename (asset_system::AssetLibrary *library, asset_system::CatalogID catalog_id, StringRefNull new_name)
 
void catalog_move (asset_system::AssetLibrary *library, asset_system::CatalogID src_catalog_id, std::optional< asset_system::CatalogID > dst_parent_catalog_id=std::nullopt)
 
bool filter_matches_asset (const AssetFilterSettings *filter, const blender::asset_system::AssetRepresentation &asset)
 
asset_system::AssetCatalogTree build_filtered_catalog_tree (const asset_system::AssetLibrary &library, const AssetLibraryReference &library_ref, blender::FunctionRef< bool(const asset_system::AssetRepresentation &)> is_asset_visible_fn)
 
AssetItemTree build_filtered_all_catalog_tree (const AssetLibraryReference &library_ref, const bContext &C, const AssetFilterSettings &filter_settings, FunctionRef< bool(const AssetMetaData &)> meta_data_filter={})
 
asset_system::AssetRepresentationhandle_get_representation (const AssetHandle *asset)
 
int handle_get_preview_icon_id (const AssetHandle *asset)
 
int handle_get_preview_or_type_icon_id (const AssetHandle *asset)
 
IDasset_local_id_ensure_imported (Main &bmain, const asset_system::AssetRepresentation &asset)
 
int library_reference_to_enum_value (const AssetLibraryReference *library)
 
AssetLibraryReference library_reference_from_enum_value (int value)
 
const EnumPropertyItemlibrary_reference_to_rna_enum_itemf (bool include_generated)
 
bool mark_id (ID *id)
 
void generate_preview (const bContext *C, ID *id)
 
bool clear_id (ID *id)
 
bool copy_to_id (const AssetMetaData *asset_data, ID *destination)
 
void pre_save_assets (Main *bmain)
 
bool can_mark_single_from_context (const bContext *C)
 
AssetTempIDConsumer * temp_id_consumer_create (const blender::asset_system::AssetRepresentation *asset)
 
void temp_id_consumer_free (AssetTempIDConsumer **consumer)
 
IDtemp_id_consumer_ensure_local_id (AssetTempIDConsumer *consumer, ID_Type id_type, Main *bmain, ReportList *reports)
 
bool id_type_is_non_experimental (const ID *id)
 
bool id_type_is_supported (const ID *id)
 
int64_t types_supported_as_filter_flags ()
 
static bool catalog_name_exists_fn (void *arg, const char *name)
 
static std::string catalog_name_ensure_unique (AssetCatalogService &catalog_service, StringRefNull name, StringRef parent_path)
 
void catalog_move (AssetLibrary *library, const CatalogID src_catalog_id, const std::optional< CatalogID > dst_parent_catalog_id)
 
asset_system::AssetCatalogTree build_filtered_catalog_tree (const asset_system::AssetLibrary &library, const AssetLibraryReference &library_ref, const FunctionRef< bool(const asset_system::AssetRepresentation &)> is_asset_visible_fn)
 
AssetItemTree build_filtered_all_catalog_tree (const AssetLibraryReference &library_ref, const bContext &C, const AssetFilterSettings &filter_settings, const FunctionRef< bool(const AssetMetaData &)> meta_data_filter)
 
void operator_asset_reference_props_register (StructRNA &srna)
 
void operator_asset_reference_props_set (const asset_system::AssetRepresentation &asset, PointerRNA &ptr)
 
static const asset_system::AssetRepresentationget_local_asset_from_relative_identifier (const bContext &C, const StringRefNull relative_identifier, ReportList *reports)
 
const asset_system::AssetRepresentationfind_asset_from_weak_ref (const bContext &C, const AssetWeakReference &weak_ref, ReportList *reports)
 
const asset_system::AssetRepresentationoperator_asset_reference_props_get_asset_from_all_library (const bContext &C, PointerRNA &ptr, ReportList *reports)
 
void draw_menu_for_catalog (const asset_system::AssetCatalogTreeItem &item, const StringRefNull menu_name, uiLayout &layout)
 
static Vector< PointerRNAget_single_id_vec_from_context (const bContext *C)
 
static Vector< PointerRNAasset_operation_get_ids_from_context (const bContext *C)
 
static IDVecStats asset_operation_get_id_vec_stats_from_ids (const Span< PointerRNA > id_pointers)
 
static const char * asset_operation_unsupported_type_msg (const bool is_single)
 
static int asset_mark_exec (const bContext *C, const wmOperator *op, const Span< PointerRNA > ids)
 
static bool asset_mark_poll (bContext *C, const Span< PointerRNA > ids)
 
static void ASSET_OT_mark (wmOperatorType *ot)
 
static void ASSET_OT_mark_single (wmOperatorType *ot)
 
static int asset_clear_exec (const bContext *C, const wmOperator *op, const Span< PointerRNA > ids)
 
static bool asset_clear_poll (bContext *C, const Span< PointerRNA > ids)
 
static std::string asset_clear_get_description (bContext *, wmOperatorType *, PointerRNA *ptr)
 
static void ASSET_OT_clear (wmOperatorType *ot)
 
static void ASSET_OT_clear_single (wmOperatorType *ot)
 
static bool asset_library_refresh_poll (bContext *C)
 
static int asset_library_refresh_exec (bContext *C, wmOperator *)
 
static void ASSET_OT_library_refresh (wmOperatorType *ot)
 
static bool asset_catalog_operator_poll (bContext *C)
 
static int asset_catalog_new_exec (bContext *C, wmOperator *op)
 
static void ASSET_OT_catalog_new (wmOperatorType *ot)
 
static int asset_catalog_delete_exec (bContext *C, wmOperator *op)
 
static void ASSET_OT_catalog_delete (wmOperatorType *ot)
 
static asset_system::AssetCatalogServiceget_catalog_service (bContext *C)
 
static int asset_catalog_undo_exec (bContext *C, wmOperator *)
 
static bool asset_catalog_undo_poll (bContext *C)
 
static void ASSET_OT_catalog_undo (wmOperatorType *ot)
 
static int asset_catalog_redo_exec (bContext *C, wmOperator *)
 
static bool asset_catalog_redo_poll (bContext *C)
 
static void ASSET_OT_catalog_redo (wmOperatorType *ot)
 
static int asset_catalog_undo_push_exec (bContext *C, wmOperator *)
 
static bool asset_catalog_undo_push_poll (bContext *C)
 
static void ASSET_OT_catalog_undo_push (wmOperatorType *ot)
 
static bool asset_catalogs_save_poll (bContext *C)
 
static int asset_catalogs_save_exec (bContext *C, wmOperator *)
 
static void ASSET_OT_catalogs_save (wmOperatorType *ot)
 
static bool could_be_asset_bundle (const Main *bmain)
 
static const bUserAssetLibraryselected_asset_library (wmOperator *op)
 
static bool is_contained_in_selected_asset_library (wmOperator *op, const char *filepath)
 
static bool set_filepath_for_asset_lib (const Main *bmain, wmOperator *op)
 
static bool has_external_files (Main *bmain, ReportList *reports)
 
static bool asset_bundle_install_poll (bContext *C)
 
static int asset_bundle_install_invoke (bContext *C, wmOperator *op, const wmEvent *)
 
static int asset_bundle_install_exec (bContext *C, wmOperator *op)
 
static const EnumPropertyItemrna_asset_library_reference_itemf (bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
 
static void ASSET_OT_bundle_install (wmOperatorType *ot)
 
static bool external_file_check_callback (BPathForeachPathData *bpath_data, char *, size_t, const char *path_src)
 
void operatortypes_asset ()
 
std::string asset_tooltip (const asset_system::AssetRepresentation &asset, const bool include_name)
 

Function Documentation

◆ asset_bundle_install_exec()

◆ asset_bundle_install_invoke()

static int blender::ed::asset::asset_bundle_install_invoke ( bContext * C,
wmOperator * op,
const wmEvent *  )
static

◆ asset_bundle_install_poll()

static bool blender::ed::asset::asset_bundle_install_poll ( bContext * C)
static

◆ asset_catalog_delete_exec()

◆ asset_catalog_new_exec()

◆ asset_catalog_operator_poll()

static bool blender::ed::asset::asset_catalog_operator_poll ( bContext * C)
static

◆ asset_catalog_redo_exec()

static int blender::ed::asset::asset_catalog_redo_exec ( bContext * C,
wmOperator *  )
static

◆ asset_catalog_redo_poll()

static bool blender::ed::asset::asset_catalog_redo_poll ( bContext * C)
static

◆ asset_catalog_undo_exec()

static int blender::ed::asset::asset_catalog_undo_exec ( bContext * C,
wmOperator *  )
static

◆ asset_catalog_undo_poll()

static bool blender::ed::asset::asset_catalog_undo_poll ( bContext * C)
static

◆ asset_catalog_undo_push_exec()

static int blender::ed::asset::asset_catalog_undo_push_exec ( bContext * C,
wmOperator *  )
static

◆ asset_catalog_undo_push_poll()

static bool blender::ed::asset::asset_catalog_undo_push_poll ( bContext * C)
static

Definition at line 660 of file asset_ops.cc.

References get_catalog_service().

Referenced by ASSET_OT_catalog_undo_push().

◆ asset_catalogs_save_exec()

◆ asset_catalogs_save_poll()

static bool blender::ed::asset::asset_catalogs_save_poll ( bContext * C)
static

◆ asset_clear_exec()

◆ asset_clear_get_description()

static std::string blender::ed::asset::asset_clear_get_description ( bContext * ,
wmOperatorType * ,
PointerRNA * ptr )
static

Definition at line 362 of file asset_ops.cc.

References ptr, RNA_boolean_get(), and TIP_.

Referenced by ASSET_OT_clear(), and ASSET_OT_clear_single().

◆ asset_clear_poll()

◆ asset_library_refresh_exec()

◆ asset_library_refresh_poll()

static bool blender::ed::asset::asset_library_refresh_poll ( bContext * C)
static

◆ asset_local_id_ensure_imported()

◆ asset_mark_exec()

◆ asset_mark_poll()

◆ asset_operation_get_id_vec_stats_from_ids()

static IDVecStats blender::ed::asset::asset_operation_get_id_vec_stats_from_ids ( const Span< PointerRNA > id_pointers)
static

Helper to report stats about the IDs in context. Operator polls use this, also to report a helpful disabled hint to the user.

Definition at line 84 of file asset_ops.cc.

References BLI_assert, PointerRNA::data, blender::ed::asset::IDVecStats::has_asset, blender::ed::asset::IDVecStats::has_supported_type, ID_IS_ASSET, id_type_is_supported(), blender::ed::asset::IDVecStats::is_single, ptr, RNA_struct_is_ID(), blender::Span< T >::size(), and PointerRNA::type.

Referenced by asset_clear_poll(), and asset_mark_poll().

◆ asset_operation_get_ids_from_context()

static Vector< PointerRNA > blender::ed::asset::asset_operation_get_ids_from_context ( const bContext * C)
static

Return the IDs to operate on as PointerRNA vector. Prioritizes multiple selected ones ("selected_ids" context member) over a single active one ("id" context member), since usually batch operations are more useful.

Definition at line 56 of file asset_ops.cc.

References CTX_data_selected_ids(), get_single_id_vec_from_context(), and blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty().

Referenced by ASSET_OT_clear(), and ASSET_OT_mark().

◆ asset_operation_unsupported_type_msg()

static const char * blender::ed::asset::asset_operation_unsupported_type_msg ( const bool is_single)
static

Definition at line 105 of file asset_ops.cc.

References ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_UI_STRING.

Referenced by asset_clear_poll(), and asset_mark_poll().

◆ ASSET_OT_bundle_install()

◆ ASSET_OT_catalog_delete()

◆ ASSET_OT_catalog_new()

◆ ASSET_OT_catalog_redo()

static void blender::ed::asset::ASSET_OT_catalog_redo ( wmOperatorType * ot)
static

◆ ASSET_OT_catalog_undo()

static void blender::ed::asset::ASSET_OT_catalog_undo ( wmOperatorType * ot)
static

◆ ASSET_OT_catalog_undo_push()

◆ ASSET_OT_catalogs_save()

static void blender::ed::asset::ASSET_OT_catalogs_save ( wmOperatorType * ot)
static

◆ ASSET_OT_clear()

◆ ASSET_OT_clear_single()

◆ ASSET_OT_library_refresh()

static void blender::ed::asset::ASSET_OT_library_refresh ( wmOperatorType * ot)
static

This operator currently covers both cases, the File/Asset Browser file list and the asset list used for the asset-view template. Once the asset list design is used by the Asset Browser, this can be simplified to just that case.

Definition at line 467 of file asset_ops.cc.

References asset_library_refresh_exec(), asset_library_refresh_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.

Referenced by operatortypes_asset().

◆ ASSET_OT_mark()

◆ ASSET_OT_mark_single()

static void blender::ed::asset::ASSET_OT_mark_single ( wmOperatorType * ot)
static

◆ asset_tooltip()

◆ build_filtered_all_catalog_tree() [1/2]

◆ build_filtered_all_catalog_tree() [2/2]

AssetItemTree blender::ed::asset::build_filtered_all_catalog_tree ( const AssetLibraryReference & library_ref,
const bContext & C,
const AssetFilterSettings & filter_settings,
FunctionRef< bool(const AssetMetaData &)> meta_data_filter = {} )

◆ build_filtered_catalog_tree() [1/2]

◆ build_filtered_catalog_tree() [2/2]

◆ can_mark_single_from_context()

bool blender::ed::asset::can_mark_single_from_context ( const bContext * C)

◆ catalog_add()

◆ catalog_move() [1/2]

void blender::ed::asset::catalog_move ( asset_system::AssetLibrary * library,
asset_system::CatalogID src_catalog_id,
std::optional< asset_system::CatalogID > dst_parent_catalog_id = std::nullopt )

Reinsert catalog identified by src_catalog_id as child to catalog identified by dst_parent_catalog_id. If dst_parent_catalog_id is not set, the catalog is moved to the root level of the tree. The name of the reinserted catalog is made unique within the parent. Note that moving a catalog to the same level it was before will also change its name, since the name uniqueness check isn't smart enough to ignore the item to be reinserted. So the caller is expected to handle this case to avoid unwanted renames.

Nothing is done (debug builds run into an assert) if the given catalog IDs can't be identified.

Referenced by blender::ed::asset_browser::AssetCatalogDropTarget::drop_asset_catalog_into_catalog().

◆ catalog_move() [2/2]

◆ catalog_name_ensure_unique()

static std::string blender::ed::asset::catalog_name_ensure_unique ( AssetCatalogService & catalog_service,
StringRefNull name,
StringRef parent_path )
static

◆ catalog_name_exists_fn()

◆ catalog_remove()

◆ catalog_rename()

◆ catalogs_get_save_catalogs_when_file_is_saved()

bool blender::ed::asset::catalogs_get_save_catalogs_when_file_is_saved ( )

◆ catalogs_read_only()

bool blender::ed::asset::catalogs_read_only ( const asset_system::AssetLibrary & library)
nodiscard

◆ catalogs_save_from_main_path()

◆ catalogs_set_save_catalogs_when_file_is_saved()

void blender::ed::asset::catalogs_set_save_catalogs_when_file_is_saved ( bool should_save)

Saving catalog edits when the file is saved is a global option shared for each asset library, and as such ignores the per asset library catalogs_read_only().

Definition at line 175 of file editors/asset/intern/asset_catalog.cc.

References blender::asset_system::AssetLibrary::save_catalogs_when_file_is_saved.

Referenced by save_catalogs_when_file_is_closed_set_fn().

◆ clear_id()

bool blender::ed::asset::clear_id ( ID * id)

Remove the asset metadata, turning the ID into a "normal" ID.

This clears the Fake User. If for some reason the data-block is meant to be saved anyway, the caller is responsible for explicitly setting the Fake User.

Returns
whether the asset metadata was actually removed; false when the ID was not an asset.

Definition at line 67 of file asset_mark_clear.cc.

References IDTypeInfo::asset_type_info, BKE_asset_metadata_free(), BKE_idtype_get_info_from_id(), id_fake_user_clear(), and blender::ed::asset::list::storage_tag_main_data_dirty().

Referenced by blender::ed::asset::AssetClearHelper::operator()().

◆ copy_to_id()

bool blender::ed::asset::copy_to_id ( const AssetMetaData * asset_data,
ID * destination )

Copy the asset metadata to the given destination ID.

The copy is assigned to destination, any pre-existing asset metadata is freed before that. If destination was not yet marked as asset, it will be after this call.

Returns
true when the copy succeeded, false otherwise. The only reason for failure is when destination is of a type that cannot be an asset.

Definition at line 115 of file asset_mark_clear.cc.

References BKE_asset_metadata_copy(), BKE_asset_metadata_free(), and BKE_id_can_be_asset().

◆ could_be_asset_bundle()

static bool blender::ed::asset::could_be_asset_bundle ( const Main * bmain)
static

Definition at line 879 of file asset_ops.cc.

References Main::filepath.

Referenced by asset_bundle_install_poll().

◆ draw_menu_for_catalog()

◆ external_file_check_callback()

static bool blender::ed::asset::external_file_check_callback ( BPathForeachPathData * bpath_data,
char * ,
size_t ,
const char * path_src )
static

◆ filter_matches_asset()

bool blender::ed::asset::filter_matches_asset ( const AssetFilterSettings * filter,
const blender::asset_system::AssetRepresentation & asset )

Compare asset against the settings of filter.

Individual filter parameters are ORed with the asset properties. That means:

  • The asset type must be one of the ID types filtered by, and
  • The asset must contain at least one of the tags filtered by. However for an asset to be matching it must have one match in each of the parameters. I.e. one matching type and at least one matching tag.
Returns
True if the asset should be visible with these filter settings (parameters match). Otherwise returns false (mismatch).

Definition at line 25 of file asset_filter.cc.

References BKE_idtype_idcode_to_idfilter(), BLI_findstring(), blender::asset_system::AssetRepresentation::get_id_type(), blender::asset_system::AssetRepresentation::get_metadata(), LISTBASE_FOREACH, offsetof, and AssetMetaData::tags.

Referenced by asset_view_filter_items(), build_filtered_all_catalog_tree(), and blender::ed::space_node::gather_search_link_ops_for_all_assets().

◆ find_asset_from_weak_ref()

◆ generate_preview()

void blender::ed::asset::generate_preview ( const bContext * C,
ID * id )

Generate preview image for the given data-block.

The preview image might be generated using a background thread.

Definition at line 57 of file asset_mark_clear.cc.

References BKE_previewimg_clear(), BKE_previewimg_id_get(), G, ICON_SIZE_PREVIEW, and UI_icon_render_id().

Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), and blender::ed::asset::AssetMarkHelper::operator()().

◆ get_catalog_service()

◆ get_local_asset_from_relative_identifier()

◆ get_single_id_vec_from_context()

static Vector< PointerRNA > blender::ed::asset::get_single_id_vec_from_context ( const bContext * C)
static

◆ handle_get_preview_icon_id()

int blender::ed::asset::handle_get_preview_icon_id ( const AssetHandle * asset)

◆ handle_get_preview_or_type_icon_id()

int blender::ed::asset::handle_get_preview_or_type_icon_id ( const AssetHandle * asset)

◆ handle_get_representation()

◆ has_external_files()

◆ id_type_is_non_experimental()

bool blender::ed::asset::id_type_is_non_experimental ( const ID * id)

Definition at line 19 of file asset_type.cc.

References ELEM, GS, ID_AC, ID_BR, ID_GR, ID_MA, ID_NT, ID_OB, and ID_WO.

Referenced by id_type_is_supported().

◆ id_type_is_supported()

bool blender::ed::asset::id_type_is_supported ( const ID * id)

Check if the asset type for id (which doesn't need to be an asset right now) can be an asset, respecting the "Extended Asset Browser" experimental feature flag.

Definition at line 26 of file asset_type.cc.

References BKE_id_can_be_asset(), and id_type_is_non_experimental().

Referenced by asset_operation_get_id_vec_stats_from_ids(), and can_mark_single_from_context().

◆ is_contained_in_selected_asset_library()

static bool blender::ed::asset::is_contained_in_selected_asset_library ( wmOperator * op,
const char * filepath )
static

Definition at line 893 of file asset_ops.cc.

References BLI_path_contains(), lib, and selected_asset_library().

Referenced by asset_bundle_install_exec().

◆ library_reference_from_enum_value()

◆ library_reference_to_enum_value()

int blender::ed::asset::library_reference_to_enum_value ( const AssetLibraryReference * library)

Return an index that can be used to uniquely identify library, assuming that all relevant indices were created with this function.

Definition at line 29 of file asset_library_reference_enum.cc.

References ASSET_LIBRARY_CUSTOM, ASSET_LIBRARY_LOCAL, BKE_preferences_asset_library_find_index(), AssetLibraryReference::custom_library_index, and AssetLibraryReference::type.

Referenced by blender::ed::sculpt_paint::brush_asset_save_as_invoke(), and library_reference_to_rna_enum_itemf().

◆ library_reference_to_rna_enum_itemf()

const EnumPropertyItem * blender::ed::asset::library_reference_to_rna_enum_itemf ( bool include_generated)

Translate all available asset libraries to an RNA enum, whereby the enum values match the result of library_reference_to_enum_value() for any given library.

Since this is meant for UI display, skips non-displayable libraries, that is, libraries with an empty name or path.

Parameters
include_generatedWhether to include libraries that are generated and thus cannot be written to. Setting this to false means only custom libraries will be included, since they are stored on disk with a single root directory, thus have a well defined location that can be written to.

Definition at line 78 of file asset_library_reference_enum.cc.

References ASSET_LIBRARY_ALL, ASSET_LIBRARY_CUSTOM, ASSET_LIBRARY_ESSENTIALS, ASSET_LIBRARY_LOCAL, BLI_assert, BLI_listbase_is_empty(), AssetLibraryReference::custom_library_index, is_valid, library_reference_to_enum_value(), LISTBASE_FOREACH_INDEX, EnumPropertyItem::name, rna_enum_asset_library_type_items, RNA_enum_item_add(), RNA_enum_item_add_separator(), RNA_enum_item_end(), and AssetLibraryReference::type.

Referenced by rna_asset_library_reference_itemf(), and blender::ed::sculpt_paint::rna_asset_library_reference_itemf().

◆ mark_id()

bool blender::ed::asset::mark_id ( ID * id)

Mark the data-block as asset.

To ensure the data-block is saved, this sets Fake User.

Returns
whether the data-block was marked as asset; false when it is not capable of becoming an asset, or when it already was an asset.

Definition at line 33 of file asset_mark_clear.cc.

References IDTypeInfo::asset_type_info, BKE_asset_metadata_create(), BKE_id_can_be_asset(), BKE_idtype_get_info_from_id(), id_fake_user_set(), and blender::ed::asset::list::storage_tag_main_data_dirty().

Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), and blender::ed::asset::AssetMarkHelper::operator()().

◆ operator_asset_reference_props_get_asset_from_all_library()

const asset_system::AssetRepresentation * blender::ed::asset::operator_asset_reference_props_get_asset_from_all_library ( const bContext & C,
PointerRNA & ptr,
ReportList * reports )

◆ operator_asset_reference_props_register()

◆ operator_asset_reference_props_set()

◆ operatortypes_asset()

◆ pre_save_assets()

void blender::ed::asset::pre_save_assets ( Main * bmain)

◆ rna_asset_library_reference_itemf()

static const EnumPropertyItem * blender::ed::asset::rna_asset_library_reference_itemf ( bContext * ,
PointerRNA * ,
PropertyRNA * ,
bool * r_free )
static

Definition at line 834 of file asset_ops.cc.

References library_reference_to_rna_enum_itemf().

Referenced by ASSET_OT_bundle_install().

◆ selected_asset_library()

◆ set_filepath_for_asset_lib()

static bool blender::ed::asset::set_filepath_for_asset_lib ( const Main * bmain,
wmOperator * op )
static

Set the "filepath" RNA property based on selected "asset_library_reference".

Returns
true if ok, false if error.

Definition at line 906 of file asset_ops.cc.

References BLI_path_basename(), BLI_path_join, FILE_MAX, Main::filepath, lib, wmOperator::ptr, RNA_string_set(), and selected_asset_library().

Referenced by asset_bundle_install_invoke().

◆ temp_id_consumer_create()

AssetTempIDConsumer * blender::ed::asset::temp_id_consumer_create ( const blender::asset_system::AssetRepresentation * asset)

Definition at line 66 of file asset_temp_id_consumer.cc.

◆ temp_id_consumer_ensure_local_id()

ID * blender::ed::asset::temp_id_consumer_ensure_local_id ( AssetTempIDConsumer * consumer,
ID_Type id_type,
Main * bmain,
ReportList * reports )

◆ temp_id_consumer_free()

void blender::ed::asset::temp_id_consumer_free ( AssetTempIDConsumer ** consumer)

Definition at line 75 of file asset_temp_id_consumer.cc.

◆ types_supported_as_filter_flags()

int64_t blender::ed::asset::types_supported_as_filter_flags ( )

Get the filter flags (subset of FILTER_ID_ALL) representing the asset ID types that may be turned into assets, respecting the "Extended Asset Browser" experimental feature flag.

Note
Does not check for BKE_id_can_be_asset(), so may return filter flags for IDs that can never be assets.

Definition at line 41 of file asset_type.cc.

References ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_FLAGS, and FILTER_ID_ALL.