|
Blender V5.0
|
Namespaces | |
| namespace | index |
| namespace | list |
| namespace | shelf |
Classes | |
| struct | AssetFilterSettings |
| struct | AssetItemTree |
| struct | IDVecStats |
| class | AssetMarkHelper |
| class | AssetClearHelper |
| struct | FileCheckCallbackInfo |
| struct | ScreenshotOperatorData |
| class | AssetTemporaryIDConsumer |
Variables | |
| constexpr int | DRAG_THRESHOLD = 4 |
|
static |
Definition at line 761 of file asset_ops.cc.
References BKE_report(), BKE_reportf(), BLI_assert_msg, BLI_path_basename(), C, CTX_data_main(), blender::wm::ExecDefault, 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(), and WM_operator_name_call().
Referenced by ASSET_OT_bundle_install().
|
static |
Definition at line 742 of file asset_ops.cc.
References C, 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 716 of file asset_ops.cc.
References BKE_preferences_asset_library_containing_path(), C, could_be_asset_bundle(), CTX_data_main(), CTX_wm_space_file(), ED_fileselect_is_local_asset_library(), Main::filepath, and U.
Referenced by ASSET_OT_bundle_install().
|
static |
Definition at line 519 of file asset_ops.cc.
References BLI_uuid_parse_string(), C, catalog_remove(), CTX_wm_manager(), CTX_wm_space_file(), CTX_wm_window(), ED_fileselect_active_asset_library_get(), NC_ASSET, ND_ASSET_CATALOGS, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get(), and WM_event_add_notifier_ex().
Referenced by ASSET_OT_catalog_delete().
|
static |
Definition at line 481 of file asset_ops.cc.
References C, 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(), NC_ASSET, ND_ASSET_CATALOGS, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get(), and WM_event_add_notifier_ex().
Referenced by ASSET_OT_catalog_new().
|
static |
Definition at line 464 of file asset_ops.cc.
References C, 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 598 of file asset_ops.cc.
References C, 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 610 of file asset_ops.cc.
References C, get_catalog_service(), and blender::asset_system::AssetCatalogService::is_redo_possbile().
Referenced by ASSET_OT_catalog_redo().
|
static |
Definition at line 568 of file asset_ops.cc.
References C, 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 580 of file asset_ops.cc.
References C, get_catalog_service(), and blender::asset_system::AssetCatalogService::is_undo_possbile().
Referenced by ASSET_OT_catalog_undo().
|
static |
Definition at line 628 of file asset_ops.cc.
References C, 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 639 of file asset_ops.cc.
References C, and get_catalog_service().
Referenced by ASSET_OT_catalog_undo_push().
|
static |
Definition at line 681 of file asset_ops.cc.
References C, 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 661 of file asset_ops.cc.
References AS_asset_library_has_any_unsaved_catalogs(), asset_catalog_operator_poll(), C, CTX_data_main(), CTX_wm_operator_poll_msg_set(), and Main::filepath.
Referenced by ASSET_OT_catalogs_save().
|
static |
Definition at line 319 of file asset_ops.cc.
References C, 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 356 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 338 of file asset_ops.cc.
References asset_operation_get_id_vec_stats_from_ids(), asset_operation_unsupported_type_msg(), C, 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 440 of file asset_ops.cc.
References C, blender::ed::asset::list::clear(), CTX_wm_asset_library_ref(), NC_ASSET, ND_ASSET_LIST_READING, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by ASSET_OT_library_refresh().
|
static |
Definition at line 423 of file asset_ops.cc.
References C, CTX_wm_asset_library_ref(), ED_operator_asset_browsing_active(), blender::ed::asset::list::has_asset_browser_storage_for_library(), and blender::ed::asset::list::has_list_storage_for_library().
Referenced by ASSET_OT_library_refresh().
| ID * blender::ed::asset::asset_local_id_ensure_imported | ( | Main & | bmain, |
| const asset_system::AssetRepresentation & | asset, | ||
| const std::optional< eAssetImportMethod > | import_method = std::nullopt ) |
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.
| import_method | Overrides library's default importing method. If not set and the library has no default, ASSET_IMPORT_APPEND_REUSE will be used. |
Definition at line 21 of file asset_import.cc.
References ASSET_IMPORT_APPEND, ASSET_IMPORT_APPEND_REUSE, ASSET_IMPORT_LINK, ASSET_IMPORT_PACK, BLI_assert_unreachable, BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR, BLO_LIBLINK_APPEND_LOCAL_ID_REUSE, BLO_LIBLINK_APPEND_RECURSIVE, BLO_LIBLINK_PACK, FILE_RELPATH, U, 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::node_swap_group_asset_invoke(), blender::ed::space_node::search_link_ops_for_asset_metadata(), blender::ed::vse::sequencer_add_scene_asset(), and blender::ed::object::shade_auto_smooth_exec().
|
static |
Definition at line 175 of file asset_ops.cc.
References C, 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 193 of file asset_ops.cc.
References asset_operation_get_id_vec_stats_from_ids(), asset_operation_unsupported_type_msg(), C, 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 74 of file asset_ops.cc.
References BLI_assert, 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(), and blender::Span< T >::size().
Referenced by asset_clear_poll(), and asset_mark_poll().
|
static |
Definition at line 95 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 830 of file asset_ops.cc.
References asset_bundle_install_exec(), asset_bundle_install_invoke(), asset_bundle_install_poll(), FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_SAVE, FILE_SORT_DEFAULT, FILE_TYPE_BLENDER, FILE_TYPE_FOLDER, ot, PROP_ENUM, PROP_HIDDEN, PROP_NONE, rna_asset_library_reference_itemf(), RNA_def_enum_funcs(), RNA_def_property(), RNA_def_property_flag(), WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by operatortypes_asset().
|
static |
Definition at line 537 of file asset_ops.cc.
References asset_catalog_delete_exec(), asset_catalog_operator_poll(), ot, and RNA_def_string().
Referenced by operatortypes_asset().
|
static |
Definition at line 500 of file asset_ops.cc.
References asset_catalog_new_exec(), asset_catalog_operator_poll(), ot, and RNA_def_string().
Referenced by operatortypes_asset().
|
static |
Definition at line 616 of file asset_ops.cc.
References asset_catalog_redo_exec(), asset_catalog_redo_poll(), and ot.
Referenced by operatortypes_asset().
|
static |
Definition at line 586 of file asset_ops.cc.
References asset_catalog_undo_exec(), asset_catalog_undo_poll(), and ot.
Referenced by operatortypes_asset().
|
static |
Definition at line 644 of file asset_ops.cc.
References asset_catalog_undo_push_exec(), asset_catalog_undo_push_poll(), OPTYPE_INTERNAL, and ot.
Referenced by operatortypes_asset().
|
static |
Definition at line 694 of file asset_ops.cc.
References asset_catalogs_save_exec(), asset_catalogs_save_poll(), and ot.
Referenced by operatortypes_asset().
|
static |
Variant of ASSET_OT_clear that only works on the "id" context member.
Definition at line 372 of file asset_ops.cc.
References asset_clear_exec(), asset_clear_get_description(), asset_clear_poll(), C, ED_operator_get_ids_from_context_as_vec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by operatortypes_asset().
|
static |
Definition at line 397 of file asset_ops.cc.
References asset_clear_exec(), asset_clear_get_description(), asset_clear_poll(), C, ED_operator_single_id_from_context_as_vec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by operatortypes_asset().
|
static |
Definition at line 450 of file asset_ops.cc.
References asset_library_refresh_exec(), asset_library_refresh_poll(), and ot.
Referenced by operatortypes_asset().
|
static |
Definition at line 205 of file asset_ops.cc.
References asset_mark_exec(), asset_mark_poll(), C, ED_operator_get_ids_from_context_as_vec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by operatortypes_asset().
|
static |
Variant of ASSET_OT_mark that only works on the "id" context member.
Definition at line 226 of file asset_ops.cc.
References asset_mark_exec(), asset_mark_poll(), C, ED_operator_single_id_from_context_as_vec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by operatortypes_asset().
|
static |
Definition at line 1479 of file asset_ops.cc.
References ot, RNA_def_boolean(), RNA_def_int_array(), screenshot_preview_exec(), screenshot_preview_invoke(), screenshot_preview_modal(), and screenshot_preview_poll().
Referenced by operatortypes_asset().
| BIFIconID blender::ed::asset::asset_preview_icon_id | ( | const asset_system::AssetRepresentation & | asset | ) |
Definition at line 80 of file asset_ui_utils.cc.
References BKE_previewimg_is_invalid().
Referenced by asset_preview_or_icon().
| BIFIconID blender::ed::asset::asset_preview_or_icon | ( | const asset_system::AssetRepresentation & | asset | ) |
Definition at line 91 of file asset_ui_utils.cc.
References asset_preview_icon_id(), and UI_icon_from_idcode().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and file_draw_list().
| void blender::ed::asset::asset_tooltip | ( | const asset_system::AssetRepresentation & | asset, |
| uiTooltipData & | tip, | ||
| const bool | include_name ) |
Definition at line 33 of file asset_ui_utils.cc.
References ASSET_LIBRARY_CUSTOM, ASSET_LIBRARY_ESSENTIALS, ASSET_LIBRARY_LOCAL, BLI_path_split_dir_file(), AssetMetaData::description, FILE_MAX, TIP_, UI_TIP_LC_MAIN, UI_TIP_LC_NORMAL, UI_TIP_LC_VALUE, UI_TIP_STYLE_HEADER, UI_TIP_STYLE_NORMAL, UI_TIP_STYLE_SPACER, and UI_tooltip_text_field_add().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and file_draw_asset_tooltip_custom_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(), C, 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::ed::asset::list::is_loaded(), blender::ed::asset::list::iterate(), blender::ed::asset::list::library_get_once_available(), blender::MultiValueMap< Key, Value >::lookup(), blender::asset_system::AssetCatalog::path, 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::ed::asset::list::iterate(), blender::asset_system::AssetCatalog::path, and blender::asset_system::AssetCatalogPath::str().
| bool blender::ed::asset::can_mark_single_from_context | ( | const bContext * | C | ) |
Definition at line 111 of file asset_mark_clear.cc.
References C, CTX_data_pointer_get_type_silent(), PointerRNA::data, and id_type_is_supported().
Referenced by ui_popup_context_menu_for_button().
| asset_system::AssetCatalog * blender::ed::asset::catalog_add | ( | asset_system::AssetLibrary * | library, |
| StringRefNull | name, | ||
| StringRef | parent_path = nullptr ) |
Definition at line 51 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(), name, 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 112 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 33 of file editors/asset/intern/asset_catalog.cc.
References BLI_uniquename_cb(), blender::asset_system::AssetCatalogService::find_catalog_by_path(), MAX_NAME, name, and unique_name().
Referenced by catalog_add(), and catalog_move().
| void blender::ed::asset::catalog_remove | ( | asset_system::AssetLibrary * | library, |
| const asset_system::CatalogID & | catalog_id ) |
Definition at line 74 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(), and blender::ed::asset_browser::AssetCatalogTreeViewItem::delete_item().
| void blender::ed::asset::catalog_rename | ( | asset_system::AssetLibrary * | library, |
| asset_system::CatalogID | catalog_id, | ||
| StringRefNull | new_name ) |
Definition at line 87 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 193 of file editors/asset/intern/asset_catalog.cc.
References blender::asset_system::AssetLibrary::save_catalogs_when_file_is_saved.
Referenced by block_create__close_file_dialog().
|
nodiscard |
Returns if the catalogs of library are allowed to be editable, or if the UI should forbid edits.
Definition at line 27 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_asset_reference | ( | asset_system::AssetLibrary & | library, |
| const AssetWeakReference & | reference ) |
Definition at line 166 of file editors/asset/intern/asset_catalog.cc.
References AS_asset_full_path_explode_from_weak_ref(), BLI_assert_unreachable, blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::is_read_only(), MAX_ID_NAME, blender::asset_system::AssetCatalogService::undo_push(), and blender::asset_system::AssetCatalogService::write_to_disk().
Referenced by blender::ed::sculpt_paint::brush_asset_edit_metadata_exec().
| void blender::ed::asset::catalogs_save_from_main_path | ( | asset_system::AssetLibrary * | library, |
| const Main * | bmain ) |
Definition at line 153 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 188 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().
|
inlinestatic |
Definition at line 1006 of file asset_ops.cc.
References clamp_i(), and WM_window_native_pixel_size().
Referenced by screenshot_preview_draw(), screenshot_preview_exec(), and screenshot_preview_modal().
| 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 74 of file asset_mark_clear.cc.
References ID::asset_data, 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()(), and blender::ed::animrig::pose_asset_delete_exec().
| 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 122 of file asset_mark_clear.cc.
References ID::asset_data, BKE_asset_metadata_copy(), BKE_asset_metadata_free(), and BKE_id_can_be_asset().
|
static |
Definition at line 860 of file asset_ops.cc.
References Main::filepath.
Referenced by asset_bundle_install_poll().
| const EnumPropertyItem * blender::ed::asset::custom_libraries_rna_enum_itemf | ( | ) |
Same as library_reference_to_rna_enum_itemf(), but only includes custom asset libraries (libraries on disk, configured in the Preferences).
Definition at line 131 of file asset_library_reference_enum.cc.
References rna_enum_add_custom_libraries(), and RNA_enum_item_end().
Referenced by rna_asset_library_reference_itemf().
| void blender::ed::asset::draw_menu_for_catalog | ( | const asset_system::AssetCatalogTreeItem & | item, |
| const StringRefNull | menu_name, | ||
| uiLayout & | layout ) |
Definition at line 146 of file asset_menu_utils.cc.
References blender::asset_system::AssetCatalogPath::c_str(), blender::asset_system::AssetCatalogTreeItem::catalog_path(), col, uiLayout::column(), blender::asset_system::AssetCatalogTreeItem::get_name(), and IFACE_.
Referenced by blender::ed::geometry::catalog_assets_draw(), blender::ed::object::catalog_assets_draw(), blender::ed::object::root_catalogs_draw(), blender::ed::vse::sequencer_add_catalog_assets_draw(), blender::ed::vse::sequencer_add_scene_draw(), and blender::ed::geometry::ui_template_node_operator_asset_root_items().
| void blender::ed::asset::draw_node_menu_for_catalog | ( | const asset_system::AssetCatalogTreeItem & | item, |
| const StringRefNull | operator_id, | ||
| const StringRefNull | menu_name, | ||
| uiLayout & | layout ) |
Definition at line 155 of file asset_menu_utils.cc.
References blender::asset_system::AssetCatalogPath::c_str(), blender::asset_system::AssetCatalogTreeItem::catalog_path(), col, uiLayout::column(), blender::asset_system::AssetCatalogTreeItem::get_name(), and IFACE_.
Referenced by blender::ed::space_node::node_catalog_assets_draw(), and blender::ed::space_node::root_catalogs_draw().
|
static |
Definition at line 913 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(), filter, LISTBASE_FOREACH, name, offsetof, and AssetMetaData::tags.
Referenced by 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 98 of file asset_menu_utils.cc.
References blender::asset_system::all_library_reference(), ASSET_LIBRARY_LOCAL, AssetWeakReference::asset_library_type, BKE_report(), BKE_reportf(), C, 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(), blender::ed::sculpt_paint::get_asset_library_reference(), 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 58 of file asset_mark_clear.cc.
References BKE_previewimg_clear(), BKE_previewimg_id_get(), C, CTX_wm_manager(), ED_preview_id_is_supported(), ED_preview_kill_jobs_for_id(), G, ICON_SIZE_PREVIEW, and UI_icon_render_id().
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::animrig::create_pose_asset_local(), blender::ed::animrig::create_pose_asset_user_library(), blender::ed::asset::AssetMarkHelper::operator()(), and blender::ed::animrig::pose_asset_modify_exec().
|
static |
Definition at line 1040 of file asset_ops.cc.
References BKE_previewimg_clear(), BKE_previewimg_ensure(), BKE_previewimg_id_ensure(), BLI_assert_unreachable, ImBuf::byte_buffer, ImBufByteBuffer::data, PreviewImage::flag, float, PreviewImage::h, ICON_RENDER_DEFAULT_HEIGHT, ICON_SIZE_ICON, ICON_SIZE_PREVIEW, IMB_freeImBuf(), IMB_scale_into_new(), MEM_dupallocN(), Nearest, NUM_ICON_SIZES, PREVIEW_RENDER_LARGE_HEIGHT, PRV_USER_EDITED, PreviewImage::rect, PreviewImage::w, ImBuf::x, and ImBuf::y.
Referenced by screenshot_preview_exec().
| const bUserAssetLibrary * blender::ed::asset::get_asset_library_from_opptr | ( | PointerRNA & | ptr | ) |
The PointerRNA is expected to have an enum called "asset_library_reference".
Definition at line 102 of file asset_ui_utils.cc.
References BKE_preferences_asset_library_find_index(), AssetLibraryReference::custom_library_index, library_reference_from_enum_value(), ptr, RNA_enum_get(), and U.
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec().
| AssetLibraryReference blender::ed::asset::get_asset_library_ref_from_opptr | ( | PointerRNA & | ptr | ) |
The PointerRNA is expected to have an enum called "asset_library_reference".
Definition at line 109 of file asset_ui_utils.cc.
References library_reference_from_enum_value(), ptr, and RNA_enum_get().
Referenced by blender::ed::sculpt_paint::visit_library_prop_catalogs_catalog_for_search_fn().
|
static |
Definition at line 553 of file asset_ops.cc.
References C, 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 70 of file asset_menu_utils.cc.
References ASSET_LIBRARY_LOCAL, BKE_report(), BKE_reportf(), C, blender::StringRefNull::c_str(), blender::ed::asset::list::is_loaded(), blender::ed::asset::list::iterate(), RPT_ERROR, RPT_WARNING, blender::ed::asset::list::storage_fetch(), and AssetLibraryReference::type.
Referenced by find_asset_from_weak_ref().
|
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 931 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(), id_type_is_non_experimental(), U, and USER_EXPERIMENTAL_TEST.
Referenced by asset_operation_get_id_vec_stats_from_ids(), and can_mark_single_from_context().
|
static |
Definition at line 874 of file asset_ops.cc.
References BLI_path_contains(), lib, and selected_asset_library().
Referenced by asset_bundle_install_exec().
|
static |
Definition at line 29 of file asset_library_utils.cc.
References blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::create_catalog(), blender::asset_system::AssetCatalogService::find_catalog_by_path(), and blender::asset_system::AssetCatalogService::tag_has_unsaved_changes().
Referenced by library_ensure_catalogs_in_path().
| blender::asset_system::AssetCatalog & blender::ed::asset::library_ensure_catalogs_in_path | ( | blender::asset_system::AssetLibrary & | library, |
| const blender::asset_system::AssetCatalogPath & | path ) |
Find the catalog with the given path in the library. Creates it in case it doesn't exist.
Definition at line 41 of file asset_library_utils.cc.
References blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::find_catalog_by_path(), blender::asset_system::AssetCatalogPath::iterate_components(), and library_ensure_catalog().
Referenced by blender::ed::sculpt_paint::brush_asset_edit_metadata_exec(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::animrig::create_pose_asset_local(), and blender::ed::animrig::create_pose_asset_user_library().
| 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, bUserAssetLibrary::name, AssetLibraryReference::type, and U.
Referenced by get_asset_library_from_opptr(), get_asset_library_ref_from_opptr(), blender::ed::animrig::pose_asset_create_exec(), selected_asset_library(), and blender::ed::animrig::visit_library_prop_catalogs_catalog_for_search_fn().
| 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, AssetLibraryReference::type, and U.
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_invoke(), blender::ed::animrig::pose_asset_create_invoke(), and rna_enum_add_custom_libraries().
| const EnumPropertyItem * blender::ed::asset::library_reference_to_rna_enum_itemf | ( | bool | include_readonly, |
| bool | include_current_file ) |
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_readonly | If set, the "All" and "Essentials" asset libraries will be added, which cannot be written to. |
| include_current_file | If set, "Current File" asset library will be added. |
Definition at line 101 of file asset_library_reference_enum.cc.
References ASSET_LIBRARY_ALL, ASSET_LIBRARY_ESSENTIALS, ASSET_LIBRARY_LOCAL, BLI_assert, BLI_listbase_is_empty(), rna_enum_add_custom_libraries(), rna_enum_asset_library_type_items, RNA_enum_item_add(), RNA_enum_item_add_separator(), RNA_enum_item_end(), and U.
Referenced by blender::ed::animrig::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 34 of file asset_mark_clear.cc.
References ID::asset_data, 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::asset_system::tests::AssetRepresentationTest::add_dummy_id_asset(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::animrig::create_pose_asset_local(), blender::ed::animrig::create_pose_asset_user_library(), 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 134 of file asset_menu_utils.cc.
References AssetWeakReference::asset_library_identifier, AssetWeakReference::asset_library_type, C, find_asset_from_weak_ref(), ptr, AssetWeakReference::relative_asset_identifier, 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::space_node::node_swap_group_asset_invoke(), poselib_blend_init_get_action(), blender::ed::geometry::run_node_group_depends_on_cursor(), blender::ed::geometry::run_node_group_get_description(), blender::ed::vse::sequencer_add_scene_asset_get_description(), and blender::ed::vse::sequencer_add_scene_asset_invoke().
| bool blender::ed::asset::operator_asset_reference_props_is_set | ( | PointerRNA & | ptr | ) |
Definition at line 59 of file asset_menu_utils.cc.
References ptr, and RNA_struct_property_is_set().
Referenced by poselib_blend_init_get_action().
| void blender::ed::asset::operator_asset_reference_props_register | ( | StructRNA & | srna | ) |
Definition at line 32 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(), blender::ed::space_node::NODE_OT_swap_group_asset(), blender::ed::object::OBJECT_OT_modifier_add_node_group(), POSELIB_OT_apply_pose_asset(), POSELIB_OT_blend_pose_asset(), and blender::ed::vse::SEQUENCER_OT_add_scene_strip_from_scene_asset().
| void blender::ed::asset::operator_asset_reference_props_set | ( | const asset_system::AssetRepresentation & | asset, |
| PointerRNA & | ptr ) |
Definition at line 50 of file asset_menu_utils.cc.
References AssetWeakReference::asset_library_identifier, AssetWeakReference::asset_library_type, 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_asset_operator_params(), blender::ed::space_node::node_catalog_assets_draw(), blender::ed::space_node::node_unassigned_assets_draw(), blender::ed::vse::sequencer_add_catalog_assets_draw(), blender::ed::vse::sequencer_add_unassigned_assets_draw(), and blender::ed::object::unassigned_assets_draw().
| void blender::ed::asset::operatortypes_asset | ( | ) |
Definition at line 1521 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(), ASSET_OT_screenshot_preview(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
| void blender::ed::asset::pre_save_assets | ( | Main * | bmain | ) |
Definition at line 96 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().
| void blender::ed::asset::refresh_asset_library | ( | const bContext * | C, |
| const AssetLibraryReference & | library_ref ) |
Call after changes to an asset library have been made to reflect the changes in the UI.
Definition at line 62 of file asset_library_utils.cc.
References blender::asset_system::all_library_reference(), C, and blender::ed::asset::list::clear().
Referenced by blender::ed::sculpt_paint::brush_asset_delete_exec(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::sculpt_paint::brush_asset_save_exec(), blender::ed::animrig::create_pose_asset_local(), blender::ed::animrig::create_pose_asset_user_library(), blender::ed::animrig::pose_asset_delete_exec(), refresh_asset_library(), and refresh_asset_library_from_asset().
| void blender::ed::asset::refresh_asset_library | ( | const bContext * | C, |
| const bUserAssetLibrary & | user_library ) |
Definition at line 70 of file asset_library_utils.cc.
References C, refresh_asset_library(), and user_library_to_library_ref().
| void blender::ed::asset::refresh_asset_library_from_asset | ( | const bContext * | C, |
| const blender::asset_system::AssetRepresentation & | asset ) |
Definition at line 75 of file asset_library_utils.cc.
References C, and refresh_asset_library().
Referenced by blender::ed::sculpt_paint::brush_asset_edit_metadata_exec(), blender::ed::sculpt_paint::brush_asset_load_preview_exec(), blender::ed::animrig::pose_asset_modify_exec(), and screenshot_preview_exec().
|
static |
Definition at line 815 of file asset_ops.cc.
References custom_libraries_rna_enum_itemf().
Referenced by ASSET_OT_bundle_install().
|
static |
Definition at line 78 of file asset_library_reference_enum.cc.
References ASSET_LIBRARY_CUSTOM, AssetLibraryReference::custom_library_index, i, library_reference_to_enum_value(), LISTBASE_FOREACH_INDEX, RNA_enum_item_add(), AssetLibraryReference::type, and U.
Referenced by custom_libraries_rna_enum_itemf(), and library_reference_to_rna_enum_itemf().
|
inlinestatic |
Definition at line 1291 of file asset_ops.cc.
References data, wmOperator::ptr, RNA_boolean_set(), and RNA_int_set_array().
Referenced by screenshot_preview_modal().
|
static |
Definition at line 1240 of file asset_ops.cc.
References clamp_point_to_window(), data, float, sort_points(), square_points_clamp_to_window(), TH_EDITOR_BORDER, UI_draw_roundbox_aa(), UI_GetThemeColor4fv(), WM_window_native_pixel_size(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by screenshot_preview_invoke().
|
static |
Definition at line 1120 of file asset_ops.cc.
References blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_is_writable(), blender::bke::asset_edit_id_save(), BKE_area_find_region_type(), BKE_report(), BKE_reportf(), BLI_assert, BLI_assert_msg, BLI_assert_unreachable, C, clamp_point_to_window(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_asset(), CTX_wm_manager(), CTX_wm_window(), ED_area_find_under_cursor(), ED_preview_kill_jobs_for_id(), ED_view3d_draw_offscreen_imbuf(), RenderData::engine, ListBase::first, generate_previewimg_from_buffer(), IB_byte_data, IMB_freeImBuf(), IMB_rect_crop(), NA_EDITED, NC_ASSET, ND_ASSET_LIST, OB_RENDER, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, Scene::r, R_ALPHAPREMUL, RE_engine_id_BLENDER_EEVEE, RE_engine_id_BLENDER_EEVEE_NEXT, RE_engine_id_BLENDER_WORKBENCH, refresh_asset_library_from_asset(), wmOperator::reports, RGN_TYPE_WINDOW, RNA_boolean_get(), RNA_int_get_array(), RPT_ERROR, View3D::shading, sort_points(), SPACE_TYPE_ANY, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, square_points_clamp_to_window(), blender::ed::asset::list::storage_tag_main_data_dirty(), STR_ELEM, take_screenshot_crop(), ScrArea::totrct, View3DShading::type, ARegion::winx, ARegion::winy, WM_main_add_notifier(), rcti::xmin, and rcti::ymin.
Referenced by ASSET_OT_screenshot_preview(), and screenshot_preview_modal().
|
static |
Definition at line 1281 of file asset_ops.cc.
References C, CTX_wm_window(), wmOperator::customdata, data, ED_workspace_status_text(), MEM_freeN(), WM_cursor_modal_restore(), and WM_draw_cb_exit().
Referenced by screenshot_preview_modal().
|
static |
Definition at line 1431 of file asset_ops.cc.
References C, CTX_wm_screen(), CTX_wm_window(), wmOperator::customdata, data, bScreen::do_draw, MEM_callocN(), OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_boolean_get(), RNA_int_get_array(), screenshot_preview_draw(), WM_CURSOR_CROSS, WM_cursor_modal_set(), WM_draw_cb_activate(), and WM_event_add_modal_handler().
Referenced by ASSET_OT_screenshot_preview().
|
static |
Definition at line 1298 of file asset_ops.cc.
References C, clamp_point_to_window(), CTX_wm_region(), CTX_wm_screen(), CTX_wm_window(), wmOperator::customdata, data, bScreen::do_draw, DRAG_THRESHOLD, EVT_ESCKEY, EVT_LEFTSHIFTKEY, EVT_PADENTER, EVT_RETKEY, EVT_RIGHTSHIFTKEY, EVT_SPACEKEY, IFACE_, KM_PRESS, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, screenshot_area_transfer_to_rna(), screenshot_preview_exec(), screenshot_preview_exit(), status, wmEvent::type, wmEvent::val, ARegion::winrct, WM_window_native_pixel_size(), rcti::xmin, and rcti::ymin.
Referenced by ASSET_OT_screenshot_preview().
|
static |
Definition at line 1455 of file asset_ops.cc.
References BLENDER_ASSET_FILE_SUFFIX, C, CTX_wm_asset(), CTX_wm_operator_poll_msg_set(), G, and WM_operator_winactive().
Referenced by ASSET_OT_screenshot_preview().
|
static |
Definition at line 865 of file asset_ops.cc.
References BKE_preferences_asset_library_find_index(), AssetLibraryReference::custom_library_index, lib, library_reference_from_enum_value(), wmOperator::ptr, RNA_enum_get(), and U.
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 887 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().
Definition at line 995 of file asset_ops.cc.
Referenced by screenshot_preview_draw(), and screenshot_preview_exec().
|
inlinestatic |
Definition at line 1015 of file asset_ops.cc.
References WM_window_native_pixel_size().
Referenced by screenshot_preview_draw(), and screenshot_preview_exec().
Takes a screenshot of Blender for the given rect. The returned ImBuf has to be freed by the caller with IMB_freeImBuf().
Definition at line 1092 of file asset_ops.cc.
References BLI_rcti_is_valid(), C, CTX_wm_window(), IB_TAKE_OWNERSHIP, IMB_allocImBuf(), IMB_assign_byte_buffer(), IMB_rect_crop(), max_ii(), MEM_freeN(), min_ii(), WM_window_pixels_read(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by screenshot_preview_exec().
| AssetTempIDConsumer * blender::ed::asset::temp_id_consumer_create | ( | const blender::asset_system::AssetRepresentation * | asset | ) |
Definition at line 67 of file asset_temp_id_consumer.cc.
Referenced by poselib_blend_init_get_action().
| ID * blender::ed::asset::temp_id_consumer_ensure_local_id | ( | AssetTempIDConsumer * | consumer, |
| ID_Type | id_type, | ||
| Main * | bmain, | ||
| ReportList * | reports ) |
Definition at line 82 of file asset_temp_id_consumer.cc.
References blender::ed::asset::AssetTemporaryIDConsumer::get_local_id(), and blender::ed::asset::AssetTemporaryIDConsumer::import_id().
Referenced by poselib_blend_init_get_action().
| void blender::ed::asset::temp_id_consumer_free | ( | AssetTempIDConsumer ** | consumer | ) |
Definition at line 76 of file asset_temp_id_consumer.cc.
Referenced by poselib_tempload_exit().
| 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, FILTER_ID_ALL, U, and USER_EXPERIMENTAL_TEST.
Referenced by file_refresh().
| AssetLibraryReference blender::ed::asset::user_library_to_library_ref | ( | const bUserAssetLibrary & | user_library | ) |
Definition at line 54 of file asset_library_utils.cc.
References ASSET_LIBRARY_CUSTOM, BLI_findindex(), AssetLibraryReference::custom_library_index, AssetLibraryReference::type, and U.
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::sculpt_paint::brush_asset_save_as_invoke(), blender::ed::animrig::pose_asset_create_invoke(), and refresh_asset_library().
| void blender::ed::asset::visit_library_catalogs_catalog_for_search | ( | const Main & | bmain, |
| const AssetLibraryReference | lib, | ||
| StringRef | edit_text, | ||
| const FunctionRef< void(StringPropertySearchVisitParams)> | visit_fn ) |
For each catalog of the given bUserAssetLibrary call visit_fn.
| edit_text | If that text is not empty, and not matching an existing catalog path visit_fn will be called with that text and the icon ICON_ADD. |
Definition at line 115 of file asset_ui_utils.cc.
References AS_asset_library_load(), blender::asset_system::AssetCatalogTreeItem::catalog_path(), blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::catalog_tree(), blender::asset_system::AssetCatalogService::find_catalog_by_path(), blender::asset_system::AssetCatalogTree::foreach_item(), blender::StringRefBase::is_empty(), lib, and blender::asset_system::AssetCatalogPath::str().
Referenced by blender::ed::sculpt_paint::visit_active_library_catalogs_catalog_for_search_fn(), blender::ed::animrig::visit_library_prop_catalogs_catalog_for_search_fn(), and blender::ed::sculpt_paint::visit_library_prop_catalogs_catalog_for_search_fn().
|
constexpr |
Definition at line 977 of file asset_ops.cc.
Referenced by screenshot_preview_modal().