|
Blender V5.3
|
Namespaces | |
| namespace | index |
| namespace | list |
| namespace | shelf |
Classes | |
| class | AssetClearHelper |
| struct | AssetFilterSettings |
| struct | AssetItemTree |
| struct | AssetLibraryAndRef |
| class | AssetMarkHelper |
| class | AssetTemporaryIDConsumer |
| struct | FileCheckCallbackInfo |
| struct | IDVecStats |
| struct | ImportInstantiateContext |
| struct | ScreenshotOperatorData |
Variables | |
| constexpr int | DRAG_THRESHOLD = 4 |
|
static |
Definition at line 936 of file asset_ops.cc.
References asset_bundle_install_exec(), blender::BKE_report(), blender::BKE_reportf(), BLI_assert_msg, blender::BLI_path_basename(), C, blender::CTX_data_main(), blender::wm::ExecDefault, FILE_MAX, blender::Main::filepath, get_catalog_service(), has_external_files(), is_contained_in_selected_asset_library(), len(), blender::bUserAssetLibrary::name, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::asset_system::AssetCatalogService::prepare_to_merge_on_write(), blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_string_get(), blender::RPT_ERROR, blender::RPT_INFO, selected_asset_library(), blender::asset_system::AssetCatalogService::undo(), blender::asset_system::AssetCatalogService::undo_push(), blender::WM_cursor_wait(), and blender::WM_operator_name_call().
Referenced by asset_bundle_install_exec(), and ASSET_OT_bundle_install().
|
static |
Definition at line 917 of file asset_ops.cc.
References asset_bundle_install_invoke(), C, blender::CTX_data_main(), has_external_files(), blender::OPERATOR_CANCELLED, blender::OPERATOR_RUNNING_MODAL, blender::wmOperator::reports, set_filepath_for_asset_lib(), and blender::WM_event_add_fileselect().
Referenced by asset_bundle_install_invoke(), and ASSET_OT_bundle_install().
|
static |
Definition at line 891 of file asset_ops.cc.
References asset_bundle_install_poll(), blender::BKE_preferences_asset_library_containing_path(), C, could_be_asset_bundle(), blender::CTX_data_main(), blender::CTX_wm_space_file(), blender::ED_fileselect_is_local_asset_library(), blender::Main::filepath, and blender::U.
Referenced by asset_bundle_install_poll(), and ASSET_OT_bundle_install().
|
static |
Definition at line 694 of file asset_ops.cc.
References asset_catalog_delete_exec(), blender::BLI_uuid_parse_string(), C, catalog_remove(), blender::CTX_wm_manager(), blender::CTX_wm_space_file(), blender::CTX_wm_window(), blender::ED_fileselect_active_asset_library_get(), NC_ASSET, ND_ASSET_CATALOGS, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::RNA_string_get(), and blender::WM_event_add_notifier_ex().
Referenced by asset_catalog_delete_exec(), and ASSET_OT_catalog_delete().
|
static |
Definition at line 656 of file asset_ops.cc.
References asset_catalog_new_exec(), C, catalog_add(), blender::asset_system::AssetCatalog::catalog_id, blender::CTX_wm_manager(), blender::CTX_wm_space_file(), blender::CTX_wm_window(), DATA_, blender::ED_fileselect_activate_asset_catalog(), blender::ED_fileselect_active_asset_library_get(), NC_ASSET, ND_ASSET_CATALOGS, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::RNA_string_get(), and blender::WM_event_add_notifier_ex().
Referenced by asset_catalog_new_exec(), and ASSET_OT_catalog_new().
|
static |
Definition at line 639 of file asset_ops.cc.
References asset_catalog_operator_poll(), C, catalogs_read_only(), blender::CTX_wm_operator_poll_msg_set(), blender::CTX_wm_space_file(), and blender::ED_fileselect_active_asset_library_get().
Referenced by asset_catalog_operator_poll(), asset_catalogs_save_poll(), ASSET_OT_catalog_delete(), and ASSET_OT_catalog_new().
|
static |
Definition at line 773 of file asset_ops.cc.
References asset_catalog_redo_exec(), C, get_catalog_service(), NC_SPACE, ND_SPACE_ASSET_PARAMS, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::asset_system::AssetCatalogService::redo(), and blender::WM_event_add_notifier().
Referenced by asset_catalog_redo_exec(), and ASSET_OT_catalog_redo().
|
static |
Definition at line 785 of file asset_ops.cc.
References asset_catalog_redo_poll(), C, get_catalog_service(), and blender::asset_system::AssetCatalogService::is_redo_possbile().
Referenced by asset_catalog_redo_poll(), and ASSET_OT_catalog_redo().
|
static |
Definition at line 743 of file asset_ops.cc.
References asset_catalog_undo_exec(), C, get_catalog_service(), NC_SPACE, ND_SPACE_ASSET_PARAMS, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::asset_system::AssetCatalogService::undo(), and blender::WM_event_add_notifier().
Referenced by asset_catalog_undo_exec(), and ASSET_OT_catalog_undo().
|
static |
Definition at line 755 of file asset_ops.cc.
References asset_catalog_undo_poll(), C, get_catalog_service(), and blender::asset_system::AssetCatalogService::is_undo_possbile().
Referenced by asset_catalog_undo_poll(), and ASSET_OT_catalog_undo().
|
static |
Definition at line 803 of file asset_ops.cc.
References asset_catalog_undo_push_exec(), C, get_catalog_service(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, and blender::asset_system::AssetCatalogService::undo_push().
Referenced by asset_catalog_undo_push_exec(), and ASSET_OT_catalog_undo_push().
|
static |
Definition at line 814 of file asset_ops.cc.
References asset_catalog_undo_push_poll(), C, and get_catalog_service().
Referenced by asset_catalog_undo_push_poll(), and ASSET_OT_catalog_undo_push().
|
static |
Definition at line 856 of file asset_ops.cc.
References asset_catalogs_save_exec(), C, catalogs_save_from_main_path(), blender::CTX_data_main(), blender::CTX_wm_manager(), blender::CTX_wm_space_file(), blender::CTX_wm_window(), blender::ED_fileselect_active_asset_library_get(), NC_ASSET, ND_ASSET_CATALOGS, blender::OPERATOR_FINISHED, and blender::WM_event_add_notifier_ex().
Referenced by asset_catalogs_save_exec(), and ASSET_OT_catalogs_save().
|
static |
Definition at line 836 of file asset_ops.cc.
References blender::AS_asset_library_has_any_unsaved_catalogs(), asset_catalog_operator_poll(), asset_catalogs_save_poll(), C, blender::CTX_data_main(), blender::CTX_wm_operator_poll_msg_set(), and blender::Main::filepath.
Referenced by asset_catalogs_save_poll(), and ASSET_OT_catalogs_save().
|
static |
Definition at line 331 of file asset_ops.cc.
References asset_clear_exec(), C, NA_EDITED, NA_REMOVED, NC_ASSET, NC_ID, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::ed::asset::AssetClearHelper::reportResults(), blender::wmOperator::reports, blender::RNA_boolean_get(), blender::ed::asset::AssetClearHelper::wasSuccessful(), and blender::WM_main_add_notifier().
Referenced by asset_clear_exec(), ASSET_OT_clear(), and ASSET_OT_clear_single().
|
static |
Definition at line 368 of file asset_ops.cc.
References asset_clear_get_description(), blender::RNA_boolean_get(), and TIP_.
Referenced by asset_clear_get_description(), ASSET_OT_clear(), and ASSET_OT_clear_single().
|
static |
Definition at line 350 of file asset_ops.cc.
References asset_clear_poll(), asset_operation_get_id_vec_stats_from_ids(), asset_operation_unsupported_type_msg(), C, blender::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_clear_poll(), ASSET_OT_clear(), and ASSET_OT_clear_single().
|
static |
Definition at line 1800 of file asset_ops.cc.
References asset_download_exec(), blender::BKE_reportf(), C, operator_asset_reference_props_get_asset_from_all_library(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::asset_system::remote_library_request_asset_download(), blender::wmOperator::reports, blender::RNA_string_get(), and blender::RPT_ERROR.
Referenced by asset_download_exec(), and ASSET_OT_asset_download().
|
static |
Get the AssetLibrary and its AssetLibraryReference from the context.
This abstracts away the various null pointers and empty optionals that can occur, and maps them all to a single optional.
Definition at line 471 of file asset_ops.cc.
References asset_library_from_context(), C, blender::CTX_wm_asset_library_ref(), blender::CTX_wm_space_file(), blender::ED_fileselect_active_asset_library_get(), blender::ED_operator_asset_browsing_active(), blender::ed::asset::list::library_get_once_available(), and blender::asset_system::AssetLibrary::library_reference().
Referenced by asset_library_from_context(), asset_library_reload_listing_exec(), and asset_library_reload_listing_poll().
|
static |
Definition at line 566 of file asset_ops.cc.
References asset_library_refresh_exec(), asset_library_reload_listing_exec(), C, do_asset_library_refresh(), blender::OPERATOR_FINISHED, blender::wmOperator::ptr, and blender::RNA_boolean_get().
Referenced by asset_library_refresh_exec(), asset_library_refresh_invoke(), and ASSET_OT_library_refresh().
|
static |
Definition at line 588 of file asset_ops.cc.
References asset_library_refresh_get_description(), blender::wmOperatorType::description, and blender::RNA_boolean_get().
Referenced by asset_library_refresh_get_description(), and ASSET_OT_library_refresh().
|
static |
Definition at line 578 of file asset_ops.cc.
References asset_library_refresh_exec(), asset_library_refresh_invoke(), C, blender::KM_SHIFT, blender::wmEvent::modifier, blender::wmOperator::ptr, blender::RNA_boolean_get(), and blender::RNA_boolean_set().
Referenced by asset_library_refresh_invoke(), and ASSET_OT_library_refresh().
|
static |
Definition at line 435 of file asset_ops.cc.
References asset_library_refresh_poll(), C, blender::CTX_wm_asset_library_ref(), blender::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_library_refresh_poll(), and ASSET_OT_library_refresh().
|
static |
Definition at line 501 of file asset_ops.cc.
References asset_library_from_context(), asset_library_reload_listing_exec(), blender::BKE_report(), C, do_asset_library_refresh(), blender::G, blender::G_FLAG_INTERNET_ALLOW, blender::asset_system::is_or_contains_remote_libraries(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::reports, and blender::RPT_ERROR.
Referenced by asset_library_refresh_exec(), asset_library_reload_listing_exec(), and ASSET_OT_library_reload_listing().
|
static |
Definition at line 531 of file asset_ops.cc.
References asset_library_from_context(), asset_library_reload_listing_poll(), C, blender::CTX_wm_operator_poll_msg_set(), blender::G, blender::G_FLAG_INTERNET_ALLOW, and blender::asset_system::is_or_contains_remote_libraries().
Referenced by asset_library_reload_listing_poll(), and ASSET_OT_library_reload_listing().
| ID * blender::ed::asset::asset_local_id_ensure_imported | ( | Main & | bmain, |
| const asset_system::AssetRepresentation & | asset, | ||
| int | flags = 0, | ||
| const std::optional< eAssetImportMethod > | import_method = std::nullopt, | ||
| const std::optional< ImportInstantiateContext > | instantiate_context = std::nullopt, | ||
| ReportList * | reports = nullptr ) |
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 blender::ASSET_IMPORT_APPEND, blender::ASSET_IMPORT_APPEND_REUSE, blender::ASSET_IMPORT_LINK, blender::ASSET_IMPORT_PACK, asset_local_id_ensure_imported(), BLI_assert_unreachable, blender::BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR, blender::BLO_LIBLINK_APPEND_LOCAL_ID_REUSE, blender::BLO_LIBLINK_APPEND_RECURSIVE, blender::BLO_LIBLINK_PACK, blender::FILE_RELPATH, blender::U, blender::WM_file_append_datablock(), and blender::WM_file_link_datablock().
Referenced by blender::ed::object::add_essential_asset_modifier(), blender::ed::space_node::add_node_group_asset(), asset_local_id_ensure_imported(), blender::ed::geometry::get_asset_or_local_node_group(), blender::ed::object::get_asset_or_local_node_group(), blender::ed::vse::get_asset_or_local_node_group(), blender::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(), blender::ed::object::shade_auto_smooth_exec(), and blender::WM_drag_asset_id_import().
|
static |
Definition at line 185 of file asset_ops.cc.
References asset_mark_exec(), C, NA_ADDED, NA_EDITED, NC_ASSET, NC_ID, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::ed::asset::AssetMarkHelper::reportResults(), blender::wmOperator::reports, blender::ed::asset::AssetMarkHelper::wasSuccessful(), and blender::WM_main_add_notifier().
Referenced by asset_mark_exec(), ASSET_OT_mark(), and ASSET_OT_mark_single().
|
static |
Definition at line 203 of file asset_ops.cc.
References asset_mark_poll(), asset_operation_get_id_vec_stats_from_ids(), asset_operation_unsupported_type_msg(), C, blender::CTX_wm_operator_poll_msg_set(), blender::ed::asset::IDVecStats::has_supported_type, and blender::ed::asset::IDVecStats::is_single.
Referenced by asset_mark_poll(), 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 asset_operation_get_id_vec_stats_from_ids(), blender::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, blender::RNA_struct_is_ID(), and blender::Span< T >::size().
Referenced by asset_clear_poll(), asset_mark_poll(), and asset_operation_get_id_vec_stats_from_ids().
|
static |
Definition at line 105 of file asset_ops.cc.
References asset_operation_unsupported_type_msg(), and N_.
Referenced by asset_clear_poll(), asset_mark_poll(), and asset_operation_unsupported_type_msg().
|
static |
Variant of ASSET_OT_assets_download that only downloads a single specific asset given in the operator properties.
Definition at line 1828 of file asset_ops.cc.
References asset_download_exec(), ASSET_OT_asset_download(), assets_download_any_poll(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, operator_asset_reference_props_register(), blender::wmOperatorType::poll, and blender::wmOperatorType::srna.
Referenced by ASSET_OT_asset_download(), and operatortypes_asset().
|
static |
Definition at line 1786 of file asset_ops.cc.
References ASSET_OT_assets_download(), assets_download_exec(), assets_download_poll(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_assets_download(), and operatortypes_asset().
|
static |
Definition at line 1005 of file asset_ops.cc.
References asset_bundle_install_exec(), asset_bundle_install_invoke(), asset_bundle_install_poll(), blender::ASSET_LIBRARY_LOCAL, ASSET_OT_bundle_install(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::FILE_BLENDER, blender::FILE_DEFAULTDISPLAY, blender::FILE_SAVE, blender::FILE_SORT_DEFAULT, blender::FILE_TYPE_BLENDER, blender::FILE_TYPE_FOLDER, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::wmOperatorType::prop, blender::PROP_ENUM, blender::PROP_HIDDEN, blender::PROP_NONE, rna_asset_library_reference_itemf(), blender::RNA_def_enum_funcs(), blender::RNA_def_property(), blender::RNA_def_property_enum_default(), blender::RNA_def_property_flag(), blender::wmOperatorType::srna, blender::WM_FILESEL_FILEPATH, and blender::WM_operator_properties_filesel().
Referenced by ASSET_OT_bundle_install(), and operatortypes_asset().
|
static |
Definition at line 712 of file asset_ops.cc.
References asset_catalog_delete_exec(), asset_catalog_operator_poll(), ASSET_OT_catalog_delete(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::RNA_def_string(), and blender::wmOperatorType::srna.
Referenced by ASSET_OT_catalog_delete(), and operatortypes_asset().
|
static |
Definition at line 675 of file asset_ops.cc.
References asset_catalog_new_exec(), asset_catalog_operator_poll(), ASSET_OT_catalog_new(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::RNA_def_string(), and blender::wmOperatorType::srna.
Referenced by ASSET_OT_catalog_new(), and operatortypes_asset().
|
static |
Definition at line 791 of file asset_ops.cc.
References asset_catalog_redo_exec(), asset_catalog_redo_poll(), ASSET_OT_catalog_redo(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_catalog_redo(), and operatortypes_asset().
|
static |
Definition at line 761 of file asset_ops.cc.
References asset_catalog_undo_exec(), asset_catalog_undo_poll(), ASSET_OT_catalog_undo(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_catalog_undo(), and operatortypes_asset().
|
static |
Definition at line 819 of file asset_ops.cc.
References asset_catalog_undo_push_exec(), asset_catalog_undo_push_poll(), ASSET_OT_catalog_undo_push(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_INTERNAL, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_catalog_undo_push(), and operatortypes_asset().
|
static |
Definition at line 869 of file asset_ops.cc.
References asset_catalogs_save_exec(), asset_catalogs_save_poll(), ASSET_OT_catalogs_save(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_catalogs_save(), and operatortypes_asset().
|
static |
Variant of ASSET_OT_clear that only works on the "id" context member.
Definition at line 384 of file asset_ops.cc.
References asset_clear_exec(), asset_clear_get_description(), asset_clear_poll(), ASSET_OT_clear(), C, blender::wmOperatorType::description, blender::ED_operator_get_ids_from_context_as_vec(), blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::get_description, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::RNA_def_boolean(), and blender::wmOperatorType::srna.
Referenced by ASSET_OT_clear(), and operatortypes_asset().
|
static |
Definition at line 409 of file asset_ops.cc.
References asset_clear_exec(), asset_clear_get_description(), asset_clear_poll(), ASSET_OT_clear_single(), C, blender::wmOperatorType::description, blender::ED_operator_single_id_from_context_as_vec(), blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::get_description, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::RNA_def_boolean(), and blender::wmOperatorType::srna.
Referenced by ASSET_OT_clear_single(), and operatortypes_asset().
|
static |
Rename operator for external assets (in .asset.blend files).
Definition at line 1913 of file asset_ops.cc.
References ASSET_OT_external_asset_rename(), blender::wmOperatorType::description, blender::wmOperatorType::exec, external_asset_rename_exec(), external_asset_rename_invoke(), external_asset_rename_poll(), blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::wmOperatorType::poll, blender::RNA_def_string(), and blender::wmOperatorType::srna.
Referenced by ASSET_OT_external_asset_rename(), and operatortypes_asset().
|
static |
Definition at line 605 of file asset_ops.cc.
References asset_library_refresh_exec(), asset_library_refresh_get_description(), asset_library_refresh_invoke(), asset_library_refresh_poll(), ASSET_OT_library_refresh(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::get_description, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::PROP_HIDDEN, blender::PROP_SKIP_SAVE, blender::RNA_def_boolean(), blender::RNA_def_property_flag(), and blender::wmOperatorType::srna.
Referenced by ASSET_OT_library_refresh(), and operatortypes_asset().
|
static |
Definition at line 552 of file asset_ops.cc.
References asset_library_reload_listing_exec(), asset_library_reload_listing_poll(), ASSET_OT_library_reload_listing(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_library_reload_listing(), and operatortypes_asset().
|
static |
Definition at line 215 of file asset_ops.cc.
References asset_mark_exec(), asset_mark_poll(), ASSET_OT_mark(), C, blender::wmOperatorType::description, blender::ED_operator_get_ids_from_context_as_vec(), blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_mark(), and operatortypes_asset().
|
static |
Variant of ASSET_OT_mark that only works on the "id" context member.
Definition at line 236 of file asset_ops.cc.
References asset_mark_exec(), asset_mark_poll(), ASSET_OT_mark_single(), C, blender::wmOperatorType::description, blender::ED_operator_single_id_from_context_as_vec(), blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, and blender::wmOperatorType::poll.
Referenced by ASSET_OT_mark_single(), and operatortypes_asset().
|
static |
Definition at line 1662 of file asset_ops.cc.
References ASSET_OT_screenshot_preview(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, INT_MAX, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::RNA_def_boolean(), blender::RNA_def_int_array(), screenshot_preview_exec(), screenshot_preview_invoke(), screenshot_preview_modal(), screenshot_preview_poll(), and blender::wmOperatorType::srna.
Referenced by ASSET_OT_screenshot_preview(), and operatortypes_asset().
| BIFIconID blender::ed::asset::asset_preview_icon_id | ( | const asset_system::AssetRepresentation & | asset | ) |
Definition at line 116 of file asset_ui_utils.cc.
References asset_preview_icon_id(), blender::BKE_previewimg_is_invalid(), and blender::ICON_SIZE_ICON.
Referenced by asset_preview_icon_id(), and asset_preview_or_icon().
| BIFIconID blender::ed::asset::asset_preview_or_icon | ( | const asset_system::AssetRepresentation & | asset | ) |
Definition at line 127 of file asset_ui_utils.cc.
References asset_preview_icon_id(), asset_preview_or_icon(), and blender::ui::icon_from_idcode().
Referenced by asset_preview_or_icon(), blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and blender::file_draw_list().
| void blender::ed::asset::asset_tooltip | ( | const asset_system::AssetRepresentation & | asset, |
| ui::TooltipData & | tip, | ||
| const bool | include_name ) |
Definition at line 39 of file asset_ui_utils.cc.
References blender::ASSET_LIBRARY_CUSTOM, blender::ASSET_LIBRARY_ESSENTIALS, blender::ASSET_LIBRARY_LOCAL, blender::ASSET_LIBRARY_ONLINE_ESSENTIALS, asset_tooltip(), blender::BLI_path_split_dir_file(), blender::BLI_str_format_byte_unit(), BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE, blender::AssetMetaData::description, FILE_MAX, blender::asset_system::NO_MATCH, TIP_, blender::ui::TIP_LC_ALERT, blender::ui::TIP_LC_MAIN, blender::ui::TIP_LC_NORMAL, blender::ui::TIP_LC_VALUE, blender::ui::TIP_STYLE_HEADER, blender::ui::TIP_STYLE_NORMAL, and blender::ui::TIP_STYLE_SPACER.
Referenced by asset_tooltip(), blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and blender::file_draw_asset_tooltip_custom_func().
|
static |
Definition at line 1727 of file asset_ops.cc.
References assets_download_any_poll(), C, blender::CTX_wm_operator_poll_msg_set(), blender::G, blender::G_FLAG_INTERNET_ALLOW, and UNUSED_VARS.
Referenced by ASSET_OT_asset_download(), assets_download_any_poll(), and assets_download_poll().
|
static |
Definition at line 1773 of file asset_ops.cc.
References assets_download_exec(), C, blender::OPERATOR_FINISHED, blender::asset_system::remote_library_request_asset_download(), blender::wmOperator::reports, and selected_or_active_assets().
Referenced by ASSET_OT_assets_download(), and assets_download_exec().
|
static |
Definition at line 1744 of file asset_ops.cc.
References assets_download_any_poll(), assets_download_poll(), C, blender::CTX_wm_operator_poll_msg_set(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), and selected_or_active_assets().
Referenced by ASSET_OT_assets_download(), and assets_download_poll().
| 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, | ||
| const std::optional< StringRef > | skip_prefix ) |
Definition at line 107 of file asset_filter.cc.
References blender::MultiValueMap< Key, Value >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BLI_uuid_is_nil(), build_filtered_all_catalog_tree(), C, blender::AssetMetaData::catalog_id, blender::asset_system::AssetCatalogTreeItem::catalog_path(), catalog_path_skipped_prefix(), filter_matches_asset(), 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, blender::ed::asset::list::storage_fetch(), and blender::asset_system::AssetCatalogPath::str().
| 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 = {}, | ||
| const std::optional< StringRef > | skip_prefix = std::nullopt ) |
References build_filtered_all_catalog_tree(), and C.
Referenced by blender::build_catalog_tree(), blender::ed::object::build_catalog_tree(), blender::ed::space_node::build_catalog_tree(), blender::ed::vse::build_catalog_tree(), build_filtered_all_catalog_tree(), and build_filtered_all_catalog_tree().
| 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(), blender::BLI_uuid_is_nil(), build_filtered_catalog_tree(), blender::AssetMetaData::catalog_id, blender::asset_system::AssetCatalogTreeItem::catalog_path(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::asset_system::AssetCatalogTreeItem::get_catalog_id(), blender::ed::asset::list::iterate(), blender::asset_system::AssetCatalog::path, and blender::asset_system::AssetCatalogPath::str().
| asset_system::AssetCatalogTree blender::ed::asset::build_filtered_catalog_tree | ( | const asset_system::AssetLibrary & | library, |
| const AssetLibraryReference & | library_ref, | ||
| FunctionRef< bool(const asset_system::AssetRepresentation &)> | is_asset_visible_fn ) |
| bool blender::ed::asset::can_mark_single_from_context | ( | const bContext * | C | ) |
Definition at line 111 of file asset_mark_clear.cc.
References C, can_mark_single_from_context(), blender::CTX_data_pointer_get_type_silent(), blender::PointerRNA::data, and id_type_is_supported().
Referenced by can_mark_single_from_context(), and blender::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 blender::asset_system::AssetCatalogPath::AssetCatalogPath(), catalog_add(), catalog_name_ensure_unique(), 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(), and blender::WM_main_add_notifier().
Referenced by asset_catalog_new_exec(), and catalog_add().
| 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.
References catalog_move().
Referenced by catalog_move(), catalog_move(), and 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_move(), catalog_name_ensure_unique(), 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(), blender::asset_system::AssetCatalogService::update_catalog_path(), and blender::WM_main_add_notifier().
|
static |
Definition at line 33 of file editors/asset/intern/asset_catalog.cc.
References blender::asset_system::AssetCatalogPath::AssetCatalogPath(), blender::BLI_uniquename_cb(), blender::StringRefNull::c_str(), catalog_name_ensure_unique(), blender::asset_system::AssetCatalogService::find_catalog_by_path(), and MAX_NAME.
Referenced by catalog_add(), catalog_move(), and catalog_name_ensure_unique().
|
static |
Definition at line 96 of file asset_filter.cc.
References catalog_path_skipped_prefix(), blender::asset_system::AssetCatalogPath::SEPARATOR, blender::asset_system::AssetCatalogPath::str(), and blender::StringRef::StringRef().
Referenced by build_filtered_all_catalog_tree(), and catalog_path_skipped_prefix().
| 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 catalog_remove(), 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 blender::WM_main_add_notifier().
Referenced by asset_catalog_delete_exec(), catalog_remove(), 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 catalog_rename(), 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::StringRef::StringRef(), blender::asset_system::AssetCatalogService::tag_has_unsaved_changes(), blender::asset_system::AssetCatalogService::undo_push(), blender::asset_system::AssetCatalogService::update_catalog_path(), and blender::WM_main_add_notifier().
Referenced by catalog_rename(), and 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 catalogs_get_save_catalogs_when_file_is_saved(), and blender::asset_system::AssetLibrary::save_catalogs_when_file_is_saved.
Referenced by blender::block_create__close_file_dialog(), and catalogs_get_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 27 of file editors/asset/intern/asset_catalog.cc.
References catalogs_read_only(), and blender::asset_system::AssetCatalogService::is_read_only().
Referenced by asset_catalog_operator_poll(), blender::ed::asset_browser::AssetCatalogDropTarget::can_modify_catalogs(), catalogs_read_only(), 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 blender::AS_asset_full_path_explode_from_weak_ref(), BLI_assert_unreachable, catalogs_save_from_asset_reference(), 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(), and catalogs_save_from_asset_reference().
| 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 catalogs_save_from_main_path(), blender::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(), and catalogs_save_from_main_path().
| 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 catalogs_set_save_catalogs_when_file_is_saved(), and blender::asset_system::AssetLibrary::save_catalogs_when_file_is_saved.
Referenced by catalogs_set_save_catalogs_when_file_is_saved(), and blender::save_catalogs_when_file_is_closed_set_fn().
|
inlinestatic |
Definition at line 1182 of file asset_ops.cc.
References blender::clamp_i(), clamp_point_to_window(), and blender::WM_window_native_pixel_size().
Referenced by clamp_point_to_window(), 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 blender::IDTypeInfo::asset_type_info, blender::BKE_asset_metadata_free(), blender::BKE_idtype_get_info_from_id(), clear_id(), blender::id_fake_user_clear(), and blender::ed::asset::list::storage_tag_main_data_dirty().
Referenced by clear_id(), 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 blender::ID::asset_data, blender::BKE_asset_metadata_copy(), blender::BKE_asset_metadata_free(), blender::BKE_id_can_be_asset(), and copy_to_id().
Referenced by copy_to_id().
|
static |
Definition at line 1036 of file asset_ops.cc.
References could_be_asset_bundle(), and blender::Main::filepath.
Referenced by asset_bundle_install_poll(), and could_be_asset_bundle().
| const EnumPropertyItem * blender::ed::asset::custom_libraries_rna_enum_itemf | ( | ) |
Same as library_reference_to_rna_enum_itemf(), but only includes custom on-disk asset libraries (libraries on disk, configured in the Preferences). Online asset libraries will be excluded, their on-disk location is just a cache.
Definition at line 193 of file asset_library_reference_enum.cc.
References custom_libraries_rna_enum_itemf(), rna_enum_add_custom_libraries(), and blender::RNA_enum_item_end().
Referenced by custom_libraries_rna_enum_itemf(), and rna_asset_library_reference_itemf().
|
static |
Definition at line 47 of file asset_library_reference_enum.cc.
References blender::ASSET_LIBRARY_DISABLED, blender::BKE_preferences_asset_library_is_valid(), custom_library_is_valid(), blender::bUserAssetLibrary::flag, blender::bUserAssetLibrary::name, and blender::U.
Referenced by custom_library_is_valid(), library_reference_from_enum_value(), and rna_enum_add_custom_libraries().
|
static |
Definition at line 452 of file asset_ops.cc.
References C, blender::ed::asset::list::clear(), blender::CTX_wm_asset_library_ref(), do_asset_library_refresh(), NC_ASSET, ND_ASSET_LIST_READING, and blender::WM_event_add_notifier().
Referenced by asset_library_refresh_exec(), asset_library_reload_listing_exec(), and do_asset_library_refresh().
| void blender::ed::asset::draw_asset_menu_item | ( | const asset_system::AssetRepresentation * | asset, |
| StringRefNull | opname, | ||
| const wm::OpCallContext | operator_call_context, | ||
| ui::Layout & | layout ) |
Definition at line 186 of file asset_menu_utils.cc.
References draw_asset_menu_item(), IFACE_, blender::ui::Layout::op(), operator_asset_reference_props_set(), and UI_ITEM_NONE.
| void blender::ed::asset::draw_asset_menu_item | ( | const asset_system::AssetRepresentation * | asset, |
| ui::Layout & | layout, | ||
| FunctionRef< void(ui::Layout &, BIFIconID)> | draw_item_fn ) |
Overload that allows adding the actual menu item button in a callback, with a layout prepared for listing assets.
| draw_item_fn | The function to insert the button. The passed layout will have the asset context pointer assigned so the context menu can show operations (like "Download Asset"), and the layout will be grayed out in case the asset needs downloading. The passed icon represents the online asset status. |
Definition at line 166 of file asset_menu_utils.cc.
References blender::ui::Layout::context_ptr_set(), draw_asset_menu_item(), blender::ui::Layout::enabled_set(), blender::asset_system::NO_MATCH, blender::RNA_pointer_create_discrete(), and blender::ui::Layout::row().
Referenced by blender::ed::geometry::add_node_group_operator_button(), blender::catalog_assets_draw(), blender::ed::object::catalog_assets_draw(), blender::ed::vse::catalog_assets_draw(), draw_asset_menu_item(), draw_asset_menu_item(), blender::ed::space_node::node_catalog_assets_draw(), blender::ed::space_node::node_unassigned_assets_draw(), blender::ed::object::unassigned_assets_draw(), blender::ed::vse::unassigned_assets_draw(), and blender::unassigned_assets_draw().
| void blender::ed::asset::draw_menu_for_catalog | ( | const asset_system::AssetCatalogTreeItem & | item, |
| const StringRefNull | menu_name, | ||
| ui::Layout & | layout ) |
Definition at line 146 of file asset_menu_utils.cc.
References blender::asset_system::AssetCatalogPath::c_str(), blender::asset_system::AssetCatalogTreeItem::catalog_path(), blender::ui::Layout::column(), blender::ui::Layout::context_string_set(), draw_menu_for_catalog(), blender::asset_system::AssetCatalogTreeItem::get_name(), IFACE_, and blender::ui::Layout::menu().
Referenced by blender::catalog_assets_draw(), blender::ed::object::catalog_assets_draw(), blender::ed::vse::catalog_assets_draw(), draw_menu_for_catalog(), blender::ed::object::root_catalogs_draw(), blender::ed::vse::root_catalogs_draw(), blender::root_catalogs_draw(), blender::ed::vse::sequencer_add_catalog_assets_draw(), and blender::ed::vse::sequencer_add_scene_draw().
| void blender::ed::asset::draw_node_menu_for_catalog | ( | const asset_system::AssetCatalogTreeItem & | item, |
| const StringRefNull | operator_id, | ||
| const StringRefNull | menu_name, | ||
| ui::Layout & | layout ) |
Definition at line 155 of file asset_menu_utils.cc.
References blender::asset_system::AssetCatalogPath::c_str(), blender::asset_system::AssetCatalogTreeItem::catalog_path(), blender::ui::Layout::column(), blender::ui::Layout::context_string_set(), draw_node_menu_for_catalog(), blender::asset_system::AssetCatalogTreeItem::get_name(), IFACE_, and blender::ui::Layout::menu().
Referenced by draw_node_menu_for_catalog(), blender::ed::space_node::node_catalog_assets_draw(), and blender::ed::space_node::root_catalogs_draw().
|
static |
Definition at line 1863 of file asset_ops.cc.
References blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_rename(), blender::BKE_report(), blender::BLI_assert(), BLI_assert_unreachable, C, blender::ed::asset::list::clear(), blender::CTX_data_main(), blender::CTX_wm_asset(), external_asset_rename_exec(), NA_EDITED, NC_ASSET, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_string_get(), blender::RPT_ERROR, and blender::WM_main_add_notifier().
Referenced by ASSET_OT_external_asset_rename(), and external_asset_rename_exec().
|
static |
Definition at line 1901 of file asset_ops.cc.
References C, blender::CTX_wm_asset(), external_asset_rename_invoke(), IFACE_, blender::wmOperator::ptr, blender::RNA_string_set(), and blender::WM_operator_props_dialog_popup().
Referenced by ASSET_OT_external_asset_rename(), and external_asset_rename_invoke().
|
static |
Definition at line 1844 of file asset_ops.cc.
References C, blender::CTX_wm_asset(), blender::CTX_wm_operator_poll_msg_set(), external_asset_rename_poll(), blender::asset_system::AssetRepresentation::is_local_id(), and blender::asset_system::AssetRepresentation::is_potentially_editable_asset_blend().
Referenced by ASSET_OT_external_asset_rename(), and external_asset_rename_poll().
|
static |
Definition at line 1089 of file asset_ops.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), external_file_check_callback(), blender::ed::asset::FileCheckCallbackInfo::external_files, and blender::BPathForeachPathData::user_data.
Referenced by external_file_check_callback(), and has_external_files().
| bool blender::ed::asset::filter_matches_asset | ( | const AssetFilterSettings * | filter, |
| const 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 blender::BKE_idtype_idcode_to_idfilter(), blender::BLI_findstring(), filter_matches_asset(), blender::AssetTag::name, offsetof, and blender::AssetMetaData::tags.
Referenced by build_filtered_all_catalog_tree(), filter_matches_asset(), 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 99 of file asset_menu_utils.cc.
References blender::asset_system::all_library_reference(), blender::ASSET_LIBRARY_LOCAL, blender::AssetWeakReference::asset_library_type, blender::BKE_report(), blender::BKE_reportf(), C, find_asset_from_weak_ref(), get_local_asset_from_weak_ref(), blender::ed::asset::list::is_loaded(), blender::ed::asset::list::iterate(), blender::ed::asset::list::library_get_once_available(), blender::asset_system::AssetLibrary::resolve_asset_weak_reference_to_full_path(), blender::RPT_ERROR, blender::RPT_WARNING, and blender::ed::asset::list::storage_fetch().
Referenced by blender::ed::object::add_essential_asset_modifier(), blender::ed::geometry::add_node_group_operator_button(), 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(), find_asset_from_weak_ref(), blender::ed::sculpt_paint::get_asset_library_reference(), blender::ed::geometry::get_asset_or_local_node_group(), operator_asset_reference_props_get_asset_from_all_library(), blender::ed::geometry::register_node_group_operators(), 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 blender::BKE_previewimg_clear(), blender::BKE_previewimg_id_get(), C, blender::CTX_wm_manager(), blender::ED_preview_id_render_is_supported(), blender::ED_preview_kill_jobs_for_id(), blender::G, generate_preview(), blender::ui::icon_render_id(), and blender::ICON_SIZE_PREVIEW.
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(), generate_preview(), and blender::ed::asset::AssetMarkHelper::operator()().
|
static |
Definition at line 1216 of file asset_ops.cc.
References blender::BKE_previewimg_clear(), blender::BKE_previewimg_ensure(), blender::BKE_previewimg_id_ensure(), BLI_assert_unreachable, blender::ImBuf::byte_data(), blender::PreviewImage::flag, float, generate_previewimg_from_buffer(), blender::PreviewImage::h, ICON_RENDER_DEFAULT_HEIGHT, blender::ICON_SIZE_ICON, blender::ICON_SIZE_PREVIEW, blender::IMB_freeImBuf(), blender::IMB_scale_into_new(), blender::Nearest, blender::NUM_ICON_SIZES, PREVIEW_RENDER_LARGE_HEIGHT, blender::PRV_USER_EDITED, blender::PreviewImage::rect, blender::PreviewImage::w, blender::ImBuf::x, and blender::ImBuf::y.
Referenced by generate_previewimg_from_buffer(), and 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 138 of file asset_ui_utils.cc.
References blender::BKE_preferences_asset_library_find_index(), blender::AssetLibraryReference::custom_library_index, get_asset_library_from_opptr(), library_reference_from_enum_value(), blender::RNA_enum_get(), and blender::U.
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), and get_asset_library_from_opptr().
| 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 145 of file asset_ui_utils.cc.
References get_asset_library_ref_from_opptr(), library_reference_from_enum_value(), and blender::RNA_enum_get().
Referenced by get_asset_library_ref_from_opptr(), and blender::ed::sculpt_paint::visit_library_prop_catalogs_catalog_for_search_fn().
|
static |
Definition at line 728 of file asset_ops.cc.
References C, blender::asset_system::AssetLibrary::catalog_service(), blender::CTX_wm_space_file(), blender::ED_fileselect_active_asset_library_get(), blender::ED_fileselect_is_file_browser(), and get_catalog_service().
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(), asset_catalog_undo_push_poll(), and get_catalog_service().
|
static |
#AssetLibrary::resolve_asset_weak_reference_to_full_path() currently does not support local assets.
Definition at line 71 of file asset_menu_utils.cc.
References blender::ASSET_LIBRARY_LOCAL, blender::BKE_report(), blender::BKE_reportf(), C, get_local_asset_from_weak_ref(), blender::ed::asset::list::is_loaded(), blender::ed::asset::list::iterate(), blender::AssetWeakReference::relative_asset_identifier, blender::RPT_ERROR, blender::RPT_WARNING, blender::ed::asset::list::storage_fetch(), and blender::AssetLibraryReference::type.
Referenced by find_asset_from_weak_ref(), and get_local_asset_from_weak_ref().
| std::optional< AssetLibraryReference > blender::ed::asset::get_user_library_ref_for_save | ( | const asset_system::AssetLibrary * | preferred_library = nullptr | ) |
Returns the library reference of library if set and if it is a library that can be saved to. Otherwise falls back to the first enabled user library.
Definition at line 151 of file asset_ui_utils.cc.
References blender::ASSET_LIBRARY_USE_REMOTE_URL, blender::BKE_preferences_asset_library_is_available(), BLI_assert_unreachable, blender::bUserAssetLibrary::flag, get_user_library_ref_for_save(), blender::asset_system::AssetLibrary::is_read_only(), blender::asset_system::AssetLibrary::library_reference(), blender::U, and user_library_to_library_ref().
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_invoke(), get_user_library_ref_for_save(), and blender::ed::animrig::pose_asset_create_invoke().
|
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 1107 of file asset_ops.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::begin(), blender::BKE_bpath_foreach_path_main(), blender::BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE, blender::BKE_BPATH_FOREACH_PATH_SKIP_PACKED, blender::BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES, blender::BKE_reportf(), external_file_check_callback(), blender::ed::asset::FileCheckCallbackInfo::external_files, has_external_files(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::gpu::shader::metadata::printf, blender::ed::asset::FileCheckCallbackInfo::reports, blender::RPT_ERROR, and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
Referenced by asset_bundle_install_exec(), asset_bundle_install_invoke(), and has_external_files().
| bool blender::ed::asset::id_type_is_non_experimental | ( | const ID * | id | ) |
Definition at line 19 of file asset_type.cc.
References ELEM, blender::GS(), blender::ID_AC, blender::ID_BR, blender::ID_GR, blender::ID_MA, blender::ID_NT, blender::ID_OB, blender::ID_SCE, id_type_is_non_experimental(), and blender::ID_WO.
Referenced by id_type_is_non_experimental(), and id_type_is_supported().
| bool blender::ed::asset::id_type_is_supported | ( | const ID * | id | ) |
Check if the asset type for id (which doesn't need to be an asset right now) can be an asset, respecting the "Extended Asset Browser" experimental feature flag.
Definition at line 26 of file asset_type.cc.
References blender::BKE_id_can_be_asset(), id_type_is_non_experimental(), id_type_is_supported(), blender::U, and USER_EXPERIMENTAL_TEST.
Referenced by asset_operation_get_id_vec_stats_from_ids(), can_mark_single_from_context(), and id_type_is_supported().
|
static |
Definition at line 1050 of file asset_ops.cc.
References blender::BLI_path_contains(), is_contained_in_selected_asset_library(), blender::bUserAssetLibrary::resolved_dirpath, and selected_asset_library().
Referenced by asset_bundle_install_exec(), and is_contained_in_selected_asset_library().
|
static |
Definition at line 29 of file asset_library_utils.cc.
References blender::asset_system::AssetCatalogService::create_catalog(), blender::asset_system::AssetCatalogService::find_catalog_by_path(), library_ensure_catalog(), and blender::asset_system::AssetCatalogService::tag_has_unsaved_changes().
Referenced by library_ensure_catalog(), and library_ensure_catalogs_in_path().
| asset_system::AssetCatalog & blender::ed::asset::library_ensure_catalogs_in_path | ( | asset_system::AssetLibrary & | library, |
| const 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::AssetCatalogPath::iterate_components(), library_ensure_catalog(), and library_ensure_catalogs_in_path().
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(), blender::ed::animrig::create_pose_asset_user_library(), and library_ensure_catalogs_in_path().
| 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 65 of file asset_library_reference_enum.cc.
References blender::ASSET_LIBRARY_ALL, blender::ASSET_LIBRARY_CUSTOM, blender::ASSET_LIBRARY_ESSENTIALS, blender::ASSET_LIBRARY_LOCAL, blender::ASSET_LIBRARY_ONLINE_ESSENTIALS, blender::BKE_preferences_asset_library_find_index(), blender::BLI_assert(), custom_library_is_valid(), ELEM, library_reference_from_enum_value(), and blender::U.
Referenced by get_asset_library_from_opptr(), get_asset_library_ref_from_opptr(), library_reference_from_enum_value(), 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 blender::ASSET_LIBRARY_CUSTOM, blender::ASSET_LIBRARY_LOCAL, blender::BKE_preferences_asset_library_find_index(), library_reference_to_enum_value(), and blender::U.
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_invoke(), library_reference_to_enum_value(), 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, | ||
| bool | include_remote_libraries, | ||
| bool | include_separate_online_essentials ) |
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. |
| include_remote_libraries | If set, all online asset libraries with a URL set will be added. |
| include_separate_online_essentials | If set, the online essentials will be added as a separate library from the normal Essentials. Usually they are a part of the normal Essentials library. |
Definition at line 147 of file asset_library_reference_enum.cc.
References blender::ASSET_LIBRARY_ALL, blender::ASSET_LIBRARY_ESSENTIALS, blender::ASSET_LIBRARY_LOCAL, blender::ASSET_LIBRARY_ONLINE_ESSENTIALS, blender::BLI_assert(), library_reference_to_rna_enum_itemf(), rna_enum_add_custom_libraries(), blender::rna_enum_asset_library_type_items, blender::RNA_enum_item_add(), blender::RNA_enum_item_add_separator(), blender::RNA_enum_item_end(), and blender::RNA_enum_items_add().
Referenced by library_reference_to_rna_enum_itemf(), 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 blender::IDTypeInfo::asset_type_info, blender::BKE_asset_metadata_create(), blender::BKE_id_can_be_asset(), blender::BKE_idtype_get_info_from_id(), blender::id_fake_user_set(), mark_id(), 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(), mark_id(), 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 blender::AssetWeakReference::asset_library_identifier, blender::AssetWeakReference::asset_library_type, C, find_asset_from_weak_ref(), operator_asset_reference_props_get_asset_from_all_library(), blender::AssetWeakReference::relative_asset_identifier, blender::RNA_enum_get(), and blender::RNA_string_get_alloc().
Referenced by blender::add_compositor_effect_node_group_asset_get_description(), asset_download_exec(), blender::ed::sculpt_paint::brush_asset_activate_exec(), blender::ed::object::get_asset_or_local_node_group(), blender::ed::vse::get_asset_or_local_node_group(), blender::get_asset_or_local_node_group(), blender::handle_operator_asset_reference_props(), 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(), operator_asset_reference_props_get_asset_from_all_library(), blender::poselib_blend_init_get_action(), blender::ed::vse::sequencer_add_scene_asset_get_description(), blender::ed::vse::sequencer_add_scene_asset_invoke(), and blender::ed::vse::strip_modifier_add_asset_get_description().
| bool blender::ed::asset::operator_asset_reference_props_is_set | ( | PointerRNA & | ptr | ) |
Definition at line 60 of file asset_menu_utils.cc.
References operator_asset_reference_props_is_set(), and blender::RNA_struct_property_is_set().
Referenced by blender::handle_operator_asset_reference_props(), operator_asset_reference_props_is_set(), blender::ui::popup_context_menu_for_button(), and blender::poselib_blend_init_get_action().
| void blender::ed::asset::operator_asset_reference_props_register | ( | StructRNA & | srna | ) |
Definition at line 33 of file asset_menu_utils.cc.
References blender::ASSET_LIBRARY_LOCAL, operator_asset_reference_props_register(), blender::PROP_HIDDEN, blender::PROP_SKIP_SAVE, blender::RNA_def_enum(), blender::RNA_def_property_flag(), blender::RNA_def_string(), and blender::rna_enum_asset_library_type_items.
Referenced by ASSET_OT_asset_download(), blender::ed::sculpt_paint::BRUSH_OT_asset_activate(), 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(), operator_asset_reference_props_register(), blender::POSELIB_OT_apply_pose_asset(), blender::POSELIB_OT_blend_pose_asset(), blender::SCENE_OT_add_compositor_effect_node_group_asset(), blender::ed::vse::SEQUENCER_OT_add_scene_strip_from_scene_asset(), and blender::ed::vse::SEQUENCER_OT_strip_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 blender::AssetWeakReference::asset_library_identifier, blender::AssetWeakReference::asset_library_type, operator_asset_reference_props_set(), blender::AssetWeakReference::relative_asset_identifier, blender::RNA_enum_set(), and blender::RNA_string_set().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), blender::ed::asset::shelf::create_asset_operator_params(), draw_asset_menu_item(), blender::file_add_asset_download_but(), operator_asset_reference_props_set(), blender::ed::vse::sequencer_add_catalog_assets_draw(), and blender::ed::vse::sequencer_add_unassigned_assets_draw().
| void blender::ed::asset::operatortypes_asset | ( | ) |
Definition at line 1934 of file asset_ops.cc.
References ASSET_OT_asset_download(), ASSET_OT_assets_download(), 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_external_asset_rename(), ASSET_OT_library_refresh(), ASSET_OT_library_reload_listing(), ASSET_OT_mark(), ASSET_OT_mark_single(), ASSET_OT_screenshot_preview(), operatortypes_asset(), and blender::WM_operatortype_append().
Referenced by blender::ED_spacetypes_init(), and operatortypes_asset().
| void blender::ed::asset::pre_save_assets | ( | Main * | bmain | ) |
Definition at line 96 of file asset_mark_clear.cc.
References FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, and pre_save_assets().
Referenced by pre_save_assets(), blender::wm_file_write(), and blender::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, blender::ed::asset::list::clear(), and refresh_asset_library().
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(), 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 asset_system::AssetRepresentation & | asset ) |
Definition at line 75 of file asset_library_utils.cc.
References C, refresh_asset_library(), and refresh_asset_library_from_asset().
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(), refresh_asset_library_from_asset(), and screenshot_preview_exec().
|
static |
Definition at line 990 of file asset_ops.cc.
References custom_libraries_rna_enum_itemf(), and rna_asset_library_reference_itemf().
Referenced by ASSET_OT_bundle_install(), and rna_asset_library_reference_itemf().
|
static |
Definition at line 95 of file asset_library_reference_enum.cc.
References blender::ASSET_LIBRARY_CUSTOM, blender::ASSET_LIBRARY_USE_REMOTE_URL, blender::BKE_preferences_asset_library_owner_get(), blender::AssetLibraryReference::custom_library_index, custom_library_is_valid(), blender::Extension, library_reference_to_enum_value(), blender::Project, rna_enum_add_custom_libraries(), blender::RNA_enum_item_add(), blender::RNA_enum_item_add_separator(), blender::AssetLibraryReference::type, blender::U, and blender::User.
Referenced by custom_libraries_rna_enum_itemf(), library_reference_to_rna_enum_itemf(), and rna_enum_add_custom_libraries().
|
inlinestatic |
Definition at line 1476 of file asset_ops.cc.
References blender::data, blender::wmOperator::ptr, blender::RNA_boolean_set(), blender::RNA_int_set_array(), and screenshot_area_transfer_to_rna().
Referenced by screenshot_area_transfer_to_rna(), and screenshot_preview_modal().
|
static |
Definition at line 1425 of file asset_ops.cc.
References clamp_point_to_window(), blender::data, blender::ui::draw_roundbox_aa(), float, blender::ui::theme::get_color_4fv(), screenshot_preview_draw(), sort_points(), square_points_clamp_to_window(), blender::TH_EDITOR_BORDER, blender::WM_window_native_pixel_size(), blender::rctf::xmax, blender::rctf::xmin, blender::rctf::ymax, and blender::rctf::ymin.
Referenced by screenshot_preview_draw(), and screenshot_preview_invoke().
|
static |
Definition at line 1298 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(), blender::BKE_area_find_region_type(), blender::BKE_report(), blender::BKE_reportf(), BLI_assert_msg, BLI_assert_unreachable, blender::BLI_rcti_size_x(), blender::BLI_rcti_size_y(), blender::ByteData, C, clamp_point_to_window(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_asset(), blender::CTX_wm_manager(), blender::CTX_wm_window(), blender::ED_area_find_under_cursor(), blender::ED_preview_kill_jobs_for_id(), blender::ED_view3d_draw_offscreen_imbuf(), blender::RenderData::engine, generate_previewimg_from_buffer(), blender::asset_system::AssetRepresentation::get_id_type(), blender::IMB_crop(), blender::IMB_freeImBuf(), blender::asset_system::AssetRepresentation::make_weak_reference(), NA_EDITED, NC_ASSET, ND_ASSET_LIST, blender::OB_RENDER, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::Scene::r, blender::R_ALPHAPREMUL, blender::RE_engine_id_BLENDER_EEVEE, blender::RE_engine_id_BLENDER_EEVEE_NEXT, blender::RE_engine_id_BLENDER_WORKBENCH, refresh_asset_library_from_asset(), blender::wmOperator::reports, blender::RGN_TYPE_WINDOW, blender::RNA_boolean_get(), blender::RNA_int_get_array(), blender::RPT_ERROR, screenshot_preview_exec(), blender::View3D::shading, sort_points(), SPACE_TYPE_ANY, blender::SPACE_VIEW3D, blender::ScrArea::spacedata, blender::ScrArea::spacetype, square_points_clamp_to_window(), blender::ed::asset::list::storage_tag_main_data_dirty(), STR_ELEM, take_screenshot_crop(), blender::ScrArea::totrct, blender::View3DShading::type, blender::ARegion::winx, blender::ARegion::winy, blender::WM_main_add_notifier(), blender::rcti::xmin, and blender::rcti::ymin.
Referenced by ASSET_OT_screenshot_preview(), screenshot_preview_exec(), and screenshot_preview_modal().
|
static |
Definition at line 1466 of file asset_ops.cc.
References C, blender::CTX_wm_window(), blender::wmOperator::customdata, blender::data, blender::ED_workspace_status_text(), screenshot_preview_exit(), blender::WM_cursor_modal_restore(), and blender::WM_draw_cb_exit().
Referenced by screenshot_preview_exit(), and screenshot_preview_modal().
|
static |
Definition at line 1616 of file asset_ops.cc.
References C, blender::CTX_wm_screen(), blender::CTX_wm_window(), blender::wmOperator::customdata, blender::data, blender::bScreen::do_draw, blender::MEM_new_zeroed(), blender::OPERATOR_RUNNING_MODAL, blender::wmOperator::ptr, blender::RNA_boolean_get(), blender::RNA_int_get_array(), screenshot_preview_draw(), screenshot_preview_invoke(), blender::WM_CURSOR_CROSS, blender::WM_cursor_modal_set(), blender::WM_draw_cb_activate(), and blender::WM_event_add_modal_handler().
Referenced by ASSET_OT_screenshot_preview(), and screenshot_preview_invoke().
|
static |
Definition at line 1483 of file asset_ops.cc.
References C, clamp_point_to_window(), blender::CTX_wm_region(), blender::CTX_wm_screen(), blender::CTX_wm_window(), blender::wmOperator::customdata, blender::data, blender::bScreen::do_draw, DRAG_THRESHOLD, blender::EVT_ESCKEY, blender::EVT_LEFTSHIFTKEY, blender::EVT_PADENTER, blender::EVT_RETKEY, blender::EVT_RIGHTSHIFTKEY, blender::EVT_SPACEKEY, IFACE_, blender::WorkspaceStatus::item(), blender::KM_PRESS, blender::KM_RELEASE, blender::LEFTMOUSE, blender::MOUSEMOVE, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::OPERATOR_RUNNING_MODAL, blender::RIGHTMOUSE, screenshot_area_transfer_to_rna(), screenshot_preview_exec(), screenshot_preview_exit(), screenshot_preview_modal(), blender::wmEvent::type, blender::wmEvent::val, blender::ARegion::winrct, blender::WM_window_native_pixel_size(), blender::rcti::xmin, and blender::rcti::ymin.
Referenced by ASSET_OT_screenshot_preview(), and screenshot_preview_modal().
|
static |
Definition at line 1640 of file asset_ops.cc.
References C, blender::CTX_wm_asset(), blender::CTX_wm_operator_poll_msg_set(), blender::G, blender::asset_system::AssetRepresentation::is_local_id(), blender::asset_system::AssetRepresentation::is_potentially_editable_asset_blend(), screenshot_preview_poll(), and blender::WM_operator_winactive().
Referenced by ASSET_OT_screenshot_preview(), and screenshot_preview_poll().
|
static |
Definition at line 1041 of file asset_ops.cc.
References blender::BKE_preferences_asset_library_find_index(), blender::AssetLibraryReference::custom_library_index, library_reference_from_enum_value(), blender::wmOperator::ptr, blender::RNA_enum_get(), selected_asset_library(), and blender::U.
Referenced by asset_bundle_install_exec(), is_contained_in_selected_asset_library(), selected_asset_library(), and set_filepath_for_asset_lib().
|
static |
Definition at line 1704 of file asset_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), C, blender::CTX_data_collection_get(), blender::CTX_wm_asset(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), selected_or_active_assets(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by assets_download_exec(), assets_download_poll(), and selected_or_active_assets().
|
static |
Set the "filepath" RNA property based on selected "asset_library_reference".
Definition at line 1063 of file asset_ops.cc.
References blender::BLI_path_basename(), BLI_path_join, FILE_MAX, blender::Main::filepath, blender::wmOperator::ptr, blender::bUserAssetLibrary::resolved_dirpath, blender::RNA_string_set(), selected_asset_library(), and set_filepath_for_asset_lib().
Referenced by asset_bundle_install_invoke(), and set_filepath_for_asset_lib().
Definition at line 1171 of file asset_ops.cc.
References sort_points().
Referenced by screenshot_preview_draw(), screenshot_preview_exec(), and sort_points().
|
inlinestatic |
Definition at line 1191 of file asset_ops.cc.
References square_points_clamp_to_window(), and blender::WM_window_native_pixel_size().
Referenced by screenshot_preview_draw(), screenshot_preview_exec(), and square_points_clamp_to_window().
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 1269 of file asset_ops.cc.
References blender::ImBuf::assign_byte_data(), blender::BLI_rcti_is_valid(), blender::BLI_rcti_size_x(), blender::BLI_rcti_size_y(), C, blender::ImBuf::color_mode, blender::CTX_wm_window(), blender::IMB_allocImBuf(), blender::IMB_crop(), blender::max_ii(), blender::min_ii(), blender::RGB, take_screenshot_crop(), blender::WM_window_pixels_read(), blender::rcti::xmax, blender::rcti::xmin, blender::rcti::ymax, blender::rcti::ymin, and blender::Zero.
Referenced by screenshot_preview_exec(), and take_screenshot_crop().
| AssetTempIDConsumer * blender::ed::asset::temp_id_consumer_create | ( | const asset_system::AssetRepresentation * | asset | ) |
Definition at line 67 of file asset_temp_id_consumer.cc.
References temp_id_consumer_create().
Referenced by blender::poselib_blend_init_get_action(), and temp_id_consumer_create().
| 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(), blender::ed::asset::AssetTemporaryIDConsumer::import_id(), and temp_id_consumer_ensure_local_id().
Referenced by blender::poselib_blend_init_get_action(), and temp_id_consumer_ensure_local_id().
| void blender::ed::asset::temp_id_consumer_free | ( | AssetTempIDConsumer ** | consumer | ) |
Definition at line 76 of file asset_temp_id_consumer.cc.
References temp_id_consumer_free().
Referenced by blender::poselib_tempload_exit(), and temp_id_consumer_free().
| 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, types_supported_as_filter_flags(), blender::U, and USER_EXPERIMENTAL_TEST.
Referenced by blender::file_refresh(), and types_supported_as_filter_flags().
| AssetLibraryReference blender::ed::asset::user_library_to_library_ref | ( | const bUserAssetLibrary & | user_library | ) |
Definition at line 54 of file asset_library_utils.cc.
References blender::ASSET_LIBRARY_CUSTOM, blender::BLI_findindex(), blender::AssetLibraryReference::custom_library_index, blender::AssetLibraryReference::type, blender::U, and user_library_to_library_ref().
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), get_user_library_ref_for_save(), refresh_asset_library(), and user_library_to_library_ref().
| 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 178 of file asset_ui_utils.cc.
References blender::AS_asset_library_load(), blender::asset_system::AssetCatalogTreeItem::catalog_path(), blender::blender::StringRefBase::is_empty(), blender::asset_system::AssetCatalogPath::str(), and visit_library_catalogs_catalog_for_search().
Referenced by blender::ed::sculpt_paint::visit_active_library_catalogs_catalog_for_search_fn(), visit_library_catalogs_catalog_for_search(), 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 1153 of file asset_ops.cc.
Referenced by screenshot_preview_modal().