|
Blender V4.3
|
Namespaces | |
| namespace | index |
| namespace | list |
| namespace | shelf |
Classes | |
| class | AssetClearHelper |
| struct | AssetFilterSettings |
| struct | AssetItemTree |
| class | AssetMarkHelper |
| class | AssetTemporaryIDConsumer |
| struct | CatalogUniqueNameFnData |
| struct | FileCheckCallbackInfo |
| struct | IDVecStats |
|
static |
Definition at line 780 of file asset_ops.cc.
References BKE_report(), BKE_reportf(), BLI_assert_msg, BLI_path_basename(), CTX_data_main(), FILE_MAX, Main::filepath, get_catalog_service(), has_external_files(), is_contained_in_selected_asset_library(), len, lib, OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::asset_system::AssetCatalogService::prepare_to_merge_on_write(), wmOperator::ptr, wmOperator::reports, RNA_string_get(), RPT_ERROR, RPT_INFO, selected_asset_library(), blender::asset_system::AssetCatalogService::undo(), blender::asset_system::AssetCatalogService::undo_push(), WM_cursor_wait(), WM_OP_EXEC_DEFAULT, and WM_operator_name_call().
Referenced by ASSET_OT_bundle_install().
|
static |
Definition at line 763 of file asset_ops.cc.
References CTX_data_main(), has_external_files(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::reports, set_filepath_for_asset_lib(), and WM_event_add_fileselect().
Referenced by ASSET_OT_bundle_install().
|
static |
Definition at line 737 of file asset_ops.cc.
References BKE_preferences_asset_library_containing_path(), could_be_asset_bundle(), CTX_data_main(), CTX_wm_space_file(), ED_fileselect_is_local_asset_library(), and Main::filepath.
Referenced by ASSET_OT_bundle_install().
|
static |
Definition at line 538 of file asset_ops.cc.
References BLI_uuid_parse_string(), catalog_remove(), CTX_wm_manager(), CTX_wm_space_file(), CTX_wm_window(), ED_fileselect_active_asset_library_get(), MEM_freeN(), NC_ASSET, ND_ASSET_CATALOGS, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get_alloc(), and WM_event_add_notifier_ex().
Referenced by ASSET_OT_catalog_delete().
|
static |
Definition at line 498 of file asset_ops.cc.
References catalog_add(), blender::asset_system::AssetCatalog::catalog_id, CTX_wm_manager(), CTX_wm_space_file(), CTX_wm_window(), DATA_, ED_fileselect_activate_asset_catalog(), ED_fileselect_active_asset_library_get(), MEM_freeN(), NC_ASSET, ND_ASSET_CATALOGS, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get_alloc(), and WM_event_add_notifier_ex().
Referenced by ASSET_OT_catalog_new().
|
static |
Definition at line 481 of file asset_ops.cc.
References catalogs_read_only(), CTX_wm_operator_poll_msg_set(), CTX_wm_space_file(), and ED_fileselect_active_asset_library_get().
Referenced by asset_catalogs_save_poll(), ASSET_OT_catalog_delete(), and ASSET_OT_catalog_new().
|
static |
Definition at line 619 of file asset_ops.cc.
References get_catalog_service(), NC_SPACE, ND_SPACE_ASSET_PARAMS, OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::asset_system::AssetCatalogService::redo(), and WM_event_add_notifier().
Referenced by ASSET_OT_catalog_redo().
|
static |
Definition at line 631 of file asset_ops.cc.
References get_catalog_service(), and blender::asset_system::AssetCatalogService::is_redo_possbile().
Referenced by ASSET_OT_catalog_redo().
|
static |
Definition at line 589 of file asset_ops.cc.
References get_catalog_service(), NC_SPACE, ND_SPACE_ASSET_PARAMS, OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::asset_system::AssetCatalogService::undo(), and WM_event_add_notifier().
Referenced by ASSET_OT_catalog_undo().
|
static |
Definition at line 601 of file asset_ops.cc.
References get_catalog_service(), and blender::asset_system::AssetCatalogService::is_undo_possbile().
Referenced by ASSET_OT_catalog_undo().
|
static |
Definition at line 649 of file asset_ops.cc.
References get_catalog_service(), OPERATOR_CANCELLED, OPERATOR_FINISHED, and blender::asset_system::AssetCatalogService::undo_push().
Referenced by ASSET_OT_catalog_undo_push().
|
static |
Definition at line 660 of file asset_ops.cc.
References get_catalog_service().
Referenced by ASSET_OT_catalog_undo_push().
|
static |
Definition at line 702 of file asset_ops.cc.
References catalogs_save_from_main_path(), CTX_data_main(), CTX_wm_manager(), CTX_wm_space_file(), CTX_wm_window(), ED_fileselect_active_asset_library_get(), NC_ASSET, ND_ASSET_CATALOGS, OPERATOR_FINISHED, and WM_event_add_notifier_ex().
Referenced by ASSET_OT_catalogs_save().
|
static |
Definition at line 682 of file asset_ops.cc.
References AS_asset_library_has_any_unsaved_catalogs(), asset_catalog_operator_poll(), CTX_data_main(), CTX_wm_operator_poll_msg_set(), and Main::filepath.
Referenced by ASSET_OT_catalogs_save().
|
static |
Definition at line 327 of file asset_ops.cc.
References NA_EDITED, NA_REMOVED, NC_ASSET, NC_ID, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, blender::ed::asset::AssetClearHelper::reportResults(), wmOperator::reports, RNA_boolean_get(), blender::ed::asset::AssetClearHelper::wasSuccessful(), and WM_main_add_notifier().
Referenced by ASSET_OT_clear(), and ASSET_OT_clear_single().
|
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().
|
static |
Definition at line 344 of file asset_ops.cc.
References asset_operation_get_id_vec_stats_from_ids(), asset_operation_unsupported_type_msg(), CTX_wm_operator_poll_msg_set(), blender::ed::asset::IDVecStats::has_asset, blender::ed::asset::IDVecStats::has_supported_type, blender::ed::asset::IDVecStats::is_single, and N_.
Referenced by ASSET_OT_clear(), and ASSET_OT_clear_single().
|
static |
Definition at line 445 of file asset_ops.cc.
References blender::ed::asset::list::clear(), CTX_wm_asset_library_ref(), CTX_wm_manager(), CTX_wm_space_file(), ED_fileselect_clear(), ED_operator_asset_browsing_active(), NC_SPACE, ND_SPACE_FILE_LIST, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by ASSET_OT_library_refresh().
|
static |
Definition at line 429 of file asset_ops.cc.
References CTX_wm_asset_library_ref(), ED_operator_asset_browsing_active(), and blender::ed::asset::list::storage_has_list_for_library().
Referenced by ASSET_OT_library_refresh().
| ID * blender::ed::asset::asset_local_id_ensure_imported | ( | Main & | bmain, |
| const asset_system::AssetRepresentation & | asset ) |
If the asset already has a corresponding local ID, return it. Otherwise, link or append the asset's data-block, using "Append & Reuse" if the method is unspecified.
Definition at line 21 of file asset_import.cc.
References ASSET_IMPORT_APPEND, ASSET_IMPORT_APPEND_REUSE, ASSET_IMPORT_LINK, BLI_assert_unreachable, BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR, BLO_LIBLINK_APPEND_LOCAL_ID_REUSE, BLO_LIBLINK_APPEND_RECURSIVE, blender::StringRefNull::c_str(), FILE_RELPATH, blender::asset_system::AssetRepresentation::full_library_path(), blender::asset_system::AssetRepresentation::get_id_type(), blender::asset_system::AssetRepresentation::get_import_method(), blender::asset_system::AssetRepresentation::get_name(), blender::asset_system::AssetRepresentation::get_use_relative_path(), blender::asset_system::AssetRepresentation::local_id(), WM_file_append_datablock(), and WM_file_link_datablock().
Referenced by blender::ed::space_node::add_node_group_asset(), blender::ed::geometry::get_asset_or_local_node_group(), blender::ed::object::get_asset_or_local_node_group(), blender::ed::space_node::search_link_ops_for_asset_metadata(), and blender::ed::object::shade_auto_smooth_exec().
|
static |
Definition at line 185 of file asset_ops.cc.
References NA_ADDED, NA_EDITED, NC_ASSET, NC_ID, OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::ed::asset::AssetMarkHelper::reportResults(), wmOperator::reports, blender::ed::asset::AssetMarkHelper::wasSuccessful(), and WM_main_add_notifier().
Referenced by ASSET_OT_mark(), and ASSET_OT_mark_single().
|
static |
Definition at line 201 of file asset_ops.cc.
References asset_operation_get_id_vec_stats_from_ids(), asset_operation_unsupported_type_msg(), CTX_wm_operator_poll_msg_set(), blender::ed::asset::IDVecStats::has_supported_type, and blender::ed::asset::IDVecStats::is_single.
Referenced by ASSET_OT_mark(), and ASSET_OT_mark_single().
|
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().
|
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().
|
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().
|
static |
Definition at line 849 of file asset_ops.cc.
References asset_bundle_install_exec(), asset_bundle_install_invoke(), asset_bundle_install_poll(), wmOperatorType::description, wmOperatorType::exec, FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_SAVE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_FOLDER, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_ENUM, PROP_HIDDEN, PROP_NONE, rna_asset_library_reference_itemf(), RNA_def_enum_funcs(), RNA_def_property(), RNA_def_property_flag(), wmOperatorType::srna, WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by operatortypes_asset().
|
static |
Definition at line 558 of file asset_ops.cc.
References asset_catalog_delete_exec(), asset_catalog_operator_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_string(), and wmOperatorType::srna.
Referenced by operatortypes_asset().
|
static |
Definition at line 519 of file asset_ops.cc.
References asset_catalog_new_exec(), asset_catalog_operator_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_string(), and wmOperatorType::srna.
Referenced by operatortypes_asset().
|
static |
Definition at line 637 of file asset_ops.cc.
References asset_catalog_redo_exec(), asset_catalog_redo_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_asset().
|
static |
Definition at line 607 of file asset_ops.cc.
References asset_catalog_undo_exec(), asset_catalog_undo_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_asset().
|
static |
Definition at line 665 of file asset_ops.cc.
References asset_catalog_undo_push_exec(), asset_catalog_undo_push_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_INTERNAL, ot, and wmOperatorType::poll.
Referenced by operatortypes_asset().
|
static |
Definition at line 715 of file asset_ops.cc.
References asset_catalogs_save_exec(), asset_catalogs_save_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_asset().
|
static |
Variant of ASSET_OT_clear that only works on the "id" context member.
Definition at line 378 of file asset_ops.cc.
References asset_clear_exec(), asset_clear_get_description(), asset_clear_poll(), asset_operation_get_ids_from_context(), C, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::get_description, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by operatortypes_asset().
|
static |
Definition at line 403 of file asset_ops.cc.
References asset_clear_exec(), asset_clear_get_description(), asset_clear_poll(), C, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::get_description, get_single_id_vec_from_context(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by operatortypes_asset().
|
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().
|
static |
Definition at line 213 of file asset_ops.cc.
References asset_mark_exec(), asset_mark_poll(), asset_operation_get_ids_from_context(), C, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by operatortypes_asset().
|
static |
Variant of ASSET_OT_mark that only works on the "id" context member.
Definition at line 234 of file asset_ops.cc.
References asset_mark_exec(), asset_mark_poll(), C, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, get_single_id_vec_from_context(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by operatortypes_asset().
| std::string blender::ed::asset::asset_tooltip | ( | const asset_system::AssetRepresentation & | asset, |
| const bool | include_name ) |
Definition at line 17 of file asset_ui_utils.cc.
References AssetMetaData::description, blender::asset_system::AssetRepresentation::get_metadata(), and blender::asset_system::AssetRepresentation::get_name().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and file_draw_asset_tooltip_func().
| AssetItemTree blender::ed::asset::build_filtered_all_catalog_tree | ( | const AssetLibraryReference & | library_ref, |
| const bContext & | C, | ||
| const AssetFilterSettings & | filter_settings, | ||
| const FunctionRef< bool(const AssetMetaData &)> | meta_data_filter ) |
Definition at line 95 of file asset_filter.cc.
References blender::MultiValueMap< Key, Value >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_uuid_is_nil(), AssetMetaData::catalog_id, blender::asset_system::AssetCatalogTreeItem::catalog_path(), blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::catalog_tree(), filter_matches_asset(), blender::asset_system::AssetCatalogService::find_catalog(), blender::asset_system::AssetCatalogTree::foreach_item(), blender::asset_system::AssetCatalogTreeItem::get_catalog_id(), blender::asset_system::AssetRepresentation::get_metadata(), blender::ed::asset::list::is_loaded(), blender::ed::asset::list::iterate(), blender::ed::asset::list::library_get_once_available(), blender::MultiValueMap< Key, Value >::lookup(), and blender::ed::asset::list::storage_fetch().
| 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 = {} ) |
| asset_system::AssetCatalogTree blender::ed::asset::build_filtered_catalog_tree | ( | const asset_system::AssetLibrary & | library, |
| const AssetLibraryReference & | library_ref, | ||
| blender::FunctionRef< bool(const asset_system::AssetRepresentation &)> | is_asset_visible_fn ) |
| asset_system::AssetCatalogTree blender::ed::asset::build_filtered_catalog_tree | ( | const asset_system::AssetLibrary & | library, |
| const AssetLibraryReference & | library_ref, | ||
| const FunctionRef< bool(const asset_system::AssetRepresentation &)> | is_asset_visible_fn ) |
Definition at line 49 of file asset_filter.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BLI_uuid_is_nil(), AssetMetaData::catalog_id, blender::asset_system::AssetCatalogTreeItem::catalog_path(), blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::catalog_tree(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::asset_system::AssetCatalogService::find_catalog(), blender::asset_system::AssetCatalogTree::foreach_item(), blender::asset_system::AssetCatalogTreeItem::get_catalog_id(), blender::asset_system::AssetRepresentation::get_metadata(), blender::ed::asset::list::iterate(), and blender::asset_system::AssetCatalogPath::str().
| bool blender::ed::asset::can_mark_single_from_context | ( | const bContext * | C | ) |
Definition at line 104 of file asset_mark_clear.cc.
References CTX_data_pointer_get_type_silent(), PointerRNA::data, and id_type_is_supported().
| asset_system::AssetCatalog * blender::ed::asset::catalog_add | ( | asset_system::AssetLibrary * | library, |
| StringRefNull | name, | ||
| StringRef | parent_path = nullptr ) |
Definition at line 60 of file editors/asset/intern/asset_catalog.cc.
References catalog_name_ensure_unique(), blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::create_catalog(), blender::asset_system::AssetCatalogService::is_read_only(), NC_SPACE, ND_SPACE_ASSET_PARAMS, blender::asset_system::AssetCatalogService::tag_has_unsaved_changes(), blender::asset_system::AssetCatalogService::undo_push(), unique_name(), and WM_main_add_notifier().
Referenced by asset_catalog_new_exec().
| 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().
| void blender::ed::asset::catalog_move | ( | AssetLibrary * | library, |
| const CatalogID | src_catalog_id, | ||
| const std::optional< CatalogID > | dst_parent_catalog_id ) |
Definition at line 121 of file editors/asset/intern/asset_catalog.cc.
References BLI_assert_unreachable, blender::asset_system::AssetCatalogPath::c_str(), catalog_name_ensure_unique(), blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogPath::cleanup(), blender::asset_system::AssetCatalogService::find_catalog(), blender::asset_system::AssetCatalogService::is_read_only(), blender::asset_system::AssetCatalogPath::name(), NC_SPACE, ND_SPACE_ASSET_PARAMS, blender::asset_system::AssetCatalog::path, blender::asset_system::AssetCatalogService::tag_has_unsaved_changes(), blender::asset_system::AssetCatalogService::undo_push(), unique_name(), blender::asset_system::AssetCatalogService::update_catalog_path(), and WM_main_add_notifier().
|
static |
Definition at line 47 of file editors/asset/intern/asset_catalog.cc.
References BLI_uniquename_cb(), catalog_name_exists_fn(), MAX_NAME, and unique_name().
Referenced by catalog_add(), and catalog_move().
|
static |
Definition at line 40 of file editors/asset/intern/asset_catalog.cc.
References blender::ed::asset::CatalogUniqueNameFnData::catalog_service, blender::asset_system::AssetCatalogService::find_catalog_by_path(), and blender::ed::asset::CatalogUniqueNameFnData::parent_path.
Referenced by catalog_name_ensure_unique().
| void blender::ed::asset::catalog_remove | ( | asset_system::AssetLibrary * | library, |
| const asset_system::CatalogID & | catalog_id ) |
Definition at line 83 of file editors/asset/intern/asset_catalog.cc.
References blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::is_read_only(), NC_SPACE, ND_SPACE_ASSET_PARAMS, blender::asset_system::AssetCatalogService::prune_catalogs_by_id(), blender::asset_system::AssetCatalogService::tag_has_unsaved_changes(), blender::asset_system::AssetCatalogService::undo_push(), and WM_main_add_notifier().
Referenced by asset_catalog_delete_exec().
| void blender::ed::asset::catalog_rename | ( | asset_system::AssetLibrary * | library, |
| asset_system::CatalogID | catalog_id, | ||
| StringRefNull | new_name ) |
Definition at line 96 of file editors/asset/intern/asset_catalog.cc.
References blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogPath::cleanup(), blender::asset_system::AssetCatalogService::find_catalog(), blender::asset_system::AssetCatalogService::is_read_only(), NC_SPACE, ND_SPACE_ASSET_PARAMS, blender::asset_system::AssetCatalogPath::parent(), blender::asset_system::AssetCatalog::path, blender::asset_system::AssetCatalogService::tag_has_unsaved_changes(), blender::asset_system::AssetCatalogService::undo_push(), blender::asset_system::AssetCatalogService::update_catalog_path(), and WM_main_add_notifier().
Referenced by blender::ed::asset_browser::AssetCatalogTreeViewItem::rename().
| bool blender::ed::asset::catalogs_get_save_catalogs_when_file_is_saved | ( | ) |
Definition at line 180 of file editors/asset/intern/asset_catalog.cc.
References blender::asset_system::AssetLibrary::save_catalogs_when_file_is_saved.
|
nodiscard |
Returns if the catalogs of library are allowed to be editable, or if the UI should forbid edits.
Definition at line 29 of file editors/asset/intern/asset_catalog.cc.
References blender::asset_system::AssetLibrary::catalog_service(), and blender::asset_system::AssetCatalogService::is_read_only().
Referenced by asset_catalog_operator_poll(), blender::ed::asset_browser::AssetCatalogDropTarget::can_modify_catalogs(), and blender::ed::asset_browser::AssetCatalogTreeViewItem::supports_renaming().
| void blender::ed::asset::catalogs_save_from_main_path | ( | asset_system::AssetLibrary * | library, |
| const Main * | bmain ) |
Definition at line 162 of file editors/asset/intern/asset_catalog.cc.
References blender::asset_system::AssetLibrary::catalog_service(), Main::filepath, blender::asset_system::AssetCatalogService::is_read_only(), blender::asset_system::AssetCatalogService::undo_push(), and blender::asset_system::AssetCatalogService::write_to_disk().
Referenced by asset_catalogs_save_exec().
| 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().
| 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.
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()().
| 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.
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().
|
static |
Definition at line 879 of file asset_ops.cc.
References Main::filepath.
Referenced by asset_bundle_install_poll().
| void blender::ed::asset::draw_menu_for_catalog | ( | const asset_system::AssetCatalogTreeItem & | item, |
| const StringRefNull | menu_name, | ||
| uiLayout & | layout ) |
Definition at line 140 of file asset_menu_utils.cc.
References blender::asset_system::AssetCatalogPath::c_str(), blender::StringRefNull::c_str(), blender::asset_system::AssetCatalogTreeItem::catalog_path(), col, blender::asset_system::AssetCatalogTreeItem::get_name(), IFACE_, uiItemM(), uiLayoutColumn(), and uiLayoutSetContextString().
Referenced by blender::ed::geometry::catalog_assets_draw(), blender::ed::object::catalog_assets_draw(), blender::ed::space_node::node_add_catalog_assets_draw(), and blender::ed::object::root_catalogs_draw().
|
static |
Definition at line 932 of file asset_ops.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::ed::asset::FileCheckCallbackInfo::external_files, and BPathForeachPathData::user_data.
Referenced by has_external_files().
| 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:
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().
| const asset_system::AssetRepresentation * blender::ed::asset::find_asset_from_weak_ref | ( | const bContext & | C, |
| const AssetWeakReference & | weak_ref, | ||
| ReportList * | reports ) |
Definition at line 92 of file asset_menu_utils.cc.
References blender::asset_system::all_library_reference(), ASSET_LIBRARY_LOCAL, AssetWeakReference::asset_library_type, BKE_report(), BKE_reportf(), blender::asset_system::AssetRepresentation::full_path(), get_local_asset_from_relative_identifier(), blender::ed::asset::list::is_loaded(), blender::ed::asset::list::iterate(), blender::ed::asset::list::library_get_once_available(), AssetWeakReference::relative_asset_identifier, blender::asset_system::AssetLibrary::resolve_asset_weak_reference_to_full_path(), RPT_ERROR, RPT_WARNING, and blender::ed::asset::list::storage_fetch().
Referenced by blender::ed::sculpt_paint::brush_asset_edit_metadata_exec(), blender::ed::sculpt_paint::brush_asset_edit_metadata_invoke(), blender::ed::sculpt_paint::brush_asset_edit_metadata_poll(), blender::ed::sculpt_paint::brush_asset_load_preview_exec(), blender::ed::sculpt_paint::brush_asset_save_as_invoke(), operator_asset_reference_props_get_asset_from_all_library(), blender::ed::object::shade_auto_smooth_exec(), and blender::ed::sculpt_paint::visit_active_library_catalogs_catalog_for_search_fn().
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()().
|
static |
Definition at line 574 of file asset_ops.cc.
References blender::asset_system::AssetLibrary::catalog_service(), CTX_wm_space_file(), ED_fileselect_active_asset_library_get(), and ED_fileselect_is_file_browser().
Referenced by asset_bundle_install_exec(), asset_catalog_redo_exec(), asset_catalog_redo_poll(), asset_catalog_undo_exec(), asset_catalog_undo_poll(), asset_catalog_undo_push_exec(), and asset_catalog_undo_push_poll().
|
static |
AssetLibrary::resolve_asset_weak_reference_to_full_path() currently does not support local assets.
Definition at line 64 of file asset_menu_utils.cc.
References ASSET_LIBRARY_LOCAL, BKE_report(), BKE_reportf(), blender::StringRefNull::c_str(), blender::ed::asset::list::is_loaded(), blender::ed::asset::list::iterate(), blender::asset_system::AssetRepresentation::library_relative_identifier(), RPT_ERROR, RPT_WARNING, blender::ed::asset::list::storage_fetch(), and AssetLibraryReference::type.
Referenced by find_asset_from_weak_ref().
|
static |
Definition at line 41 of file asset_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CTX_data_pointer_get_type(), and PointerRNA::data.
Referenced by asset_operation_get_ids_from_context(), ASSET_OT_clear_single(), and ASSET_OT_mark_single().
| int blender::ed::asset::handle_get_preview_icon_id | ( | const AssetHandle * | asset | ) |
Definition at line 26 of file asset_handle.cc.
References AssetHandle::file_data, and FileDirEntry::preview_icon_id.
Referenced by asset_view_draw_item(), and asset_view_item_but_drag_set().
| int blender::ed::asset::handle_get_preview_or_type_icon_id | ( | const AssetHandle * | asset | ) |
Definition at line 31 of file asset_handle.cc.
References ED_file_icon(), and AssetHandle::file_data.
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and blender::ed::asset::shelf::AssetView::build_items().
| asset_system::AssetRepresentation * blender::ed::asset::handle_get_representation | ( | const AssetHandle * | asset | ) |
Definition at line 21 of file asset_handle.cc.
References FileDirEntry::asset, and AssetHandle::file_data.
Referenced by asset_view_draw_item(), asset_view_item_but_drag_set(), blender::ed::asset::shelf::AssetViewItem::build_context_menu(), blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), blender::ed::asset::shelf::AssetView::build_items(), blender::ed::asset::shelf::AssetViewItem::create_drag_controller(), blender::ed::asset::shelf::AssetViewItem::on_activate(), blender::ed::asset::shelf::AssetViewItem::should_be_active(), and blender::ed::asset::shelf::AssetViewItem::should_be_filtered_visible().
|
static |
Do a check on any external files (.blend, textures, etc.) being used. The ASSET_OT_bundle_install operator only works on standalone .blend files (catalog definition files are fine, though).
Definition at line 950 of file asset_ops.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::begin(), BKE_bpath_foreach_path_main(), BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE, BKE_BPATH_FOREACH_PATH_SKIP_PACKED, BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES, BKE_reportf(), external_file_check_callback(), blender::ed::asset::FileCheckCallbackInfo::external_files, flag, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), printf, blender::ed::asset::FileCheckCallbackInfo::reports, RPT_ERROR, and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
Referenced by asset_bundle_install_exec(), and asset_bundle_install_invoke().
| bool blender::ed::asset::id_type_is_non_experimental | ( | const ID * | id | ) |
| 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().
|
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().
| AssetLibraryReference blender::ed::asset::library_reference_from_enum_value | ( | int | value | ) |
Return an asset library reference matching the index returned by library_reference_to_enum_value().
Definition at line 47 of file asset_library_reference_enum.cc.
References ASSET_LIBRARY_ALL, ASSET_LIBRARY_CUSTOM, ASSET_LIBRARY_ESSENTIALS, ASSET_LIBRARY_LOCAL, BKE_preferences_asset_library_find_index(), BLI_assert, AssetLibraryReference::custom_library_index, bUserAssetLibrary::dirpath, ELEM, is_valid, bUserAssetLibrary::name, and AssetLibraryReference::type.
Referenced by blender::ed::sculpt_paint::get_asset_library_from_prop(), selected_asset_library(), and uiTemplateAssetView().
| 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().
| 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.
| include_generated | Whether 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().
| 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.
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()().
| const asset_system::AssetRepresentation * blender::ed::asset::operator_asset_reference_props_get_asset_from_all_library | ( | const bContext & | C, |
| PointerRNA & | ptr, | ||
| ReportList * | reports ) |
Load all asset libraries to find an asset from the operator_asset_reference_props_register properties. The loading happens in the background, so there may be no result immediately. In that case an "Asset loading is unfinished" report is added.
Definition at line 128 of file asset_menu_utils.cc.
References AssetWeakReference::asset_library_type, find_asset_from_weak_ref(), ptr, RNA_enum_get(), and RNA_string_get_alloc().
Referenced by blender::ed::sculpt_paint::brush_asset_activate_exec(), blender::ed::geometry::get_asset_or_local_node_group(), blender::ed::object::get_asset_or_local_node_group(), blender::ed::object::modifier_add_asset_get_description(), blender::ed::space_node::node_add_group_asset_get_description(), blender::ed::space_node::node_add_group_asset_invoke(), blender::ed::geometry::run_node_group_depends_on_cursor(), and blender::ed::geometry::run_node_group_get_description().
| void blender::ed::asset::operator_asset_reference_props_register | ( | StructRNA & | srna | ) |
Definition at line 33 of file asset_menu_utils.cc.
References ASSET_LIBRARY_LOCAL, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), RNA_def_string(), and rna_enum_asset_library_type_items.
Referenced by blender::ed::sculpt_paint::BRUSH_OT_asset_activate(), blender::ed::geometry::GEOMETRY_OT_execute_node_group(), blender::ed::space_node::NODE_OT_add_group_asset(), and blender::ed::object::OBJECT_OT_modifier_add_node_group().
| void blender::ed::asset::operator_asset_reference_props_set | ( | const asset_system::AssetRepresentation & | asset, |
| PointerRNA & | ptr ) |
Definition at line 51 of file asset_menu_utils.cc.
References AssetWeakReference::asset_library_identifier, AssetWeakReference::asset_library_type, blender::asset_system::AssetRepresentation::make_weak_reference(), ptr, AssetWeakReference::relative_asset_identifier, RNA_enum_set(), and RNA_string_set().
Referenced by blender::ed::geometry::catalog_assets_draw(), blender::ed::object::catalog_assets_draw(), blender::ed::geometry::catalog_assets_draw_unassigned(), blender::ed::asset::shelf::create_activate_operator_params(), blender::ed::space_node::node_add_catalog_assets_draw(), blender::ed::space_node::node_add_unassigned_assets_draw(), and blender::ed::object::unassigned_assets_draw().
| void blender::ed::asset::operatortypes_asset | ( | ) |
Definition at line 998 of file asset_ops.cc.
References ASSET_OT_bundle_install(), ASSET_OT_catalog_delete(), ASSET_OT_catalog_new(), ASSET_OT_catalog_redo(), ASSET_OT_catalog_undo(), ASSET_OT_catalog_undo_push(), ASSET_OT_catalogs_save(), ASSET_OT_clear(), ASSET_OT_clear_single(), ASSET_OT_library_refresh(), ASSET_OT_mark(), ASSET_OT_mark_single(), and WM_operatortype_append().
| void blender::ed::asset::pre_save_assets | ( | Main * | bmain | ) |
Definition at line 89 of file asset_mark_clear.cc.
References ID::asset_data, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, AssetMetaData::local_type_info, and AssetTypeInfo::pre_save_fn.
Referenced by wm_file_write(), and wm_homefile_write_exec().
|
static |
Definition at line 834 of file asset_ops.cc.
References library_reference_to_rna_enum_itemf().
Referenced by ASSET_OT_bundle_install().
|
static |
Definition at line 884 of file asset_ops.cc.
References BKE_preferences_asset_library_find_index(), AssetLibraryReference::custom_library_index, lib, library_reference_from_enum_value(), wmOperator::ptr, and RNA_enum_get().
Referenced by asset_bundle_install_exec(), is_contained_in_selected_asset_library(), and set_filepath_for_asset_lib().
|
static |
Set the "filepath" RNA property based on selected "asset_library_reference".
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().
| 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.
| ID * blender::ed::asset::temp_id_consumer_ensure_local_id | ( | AssetTempIDConsumer * | consumer, |
| ID_Type | id_type, | ||
| Main * | bmain, | ||
| ReportList * | reports ) |
Definition at line 81 of file asset_temp_id_consumer.cc.
References blender::ed::asset::AssetTemporaryIDConsumer::get_local_id(), and blender::ed::asset::AssetTemporaryIDConsumer::import_id().
| void blender::ed::asset::temp_id_consumer_free | ( | AssetTempIDConsumer ** | consumer | ) |
Definition at line 75 of file asset_temp_id_consumer.cc.
| 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.
Definition at line 41 of file asset_type.cc.
References ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_FLAGS, and FILTER_ID_ALL.