Blender V4.3
BKE_asset_edit.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
27#include <optional>
28#include <string>
29
30#include "BLI_string_ref.hh"
31
32#include "DNA_ID_enums.h"
33
36struct ID;
37struct Main;
38struct ReportList;
39
40namespace blender::bke {
41
44 ID_Type id_type,
45 const AssetWeakReference &weak_ref);
46
48std::optional<AssetWeakReference> asset_edit_weak_reference_from_id(const ID &id);
49
52bool asset_edit_id_is_editable(const ID &id);
53bool asset_edit_id_is_writable(const ID &id);
54
55std::optional<std::string> asset_edit_id_save_as(Main &global_main,
56 const ID &id,
57 StringRefNull name,
58 const bUserAssetLibrary &user_library,
59 AssetWeakReference &r_weak_ref,
60 ReportList &reports);
61
62bool asset_edit_id_save(Main &global_main, const ID &id, ReportList &reports);
68ID *asset_edit_id_revert(Main &global_main, ID &id, ReportList &reports);
69bool asset_edit_id_delete(Main &global_main, ID &id, ReportList &reports);
70
71} // namespace blender::bke
Enumerations for DNA_ID.h.
ID_Type
ID * asset_edit_id_from_weak_reference(Main &global_main, ID_Type id_type, const AssetWeakReference &weak_ref)
std::optional< AssetWeakReference > asset_edit_weak_reference_from_id(const ID &id)
std::optional< std::string > asset_edit_id_save_as(Main &global_main, const ID &id, StringRefNull name, const bUserAssetLibrary &user_library, AssetWeakReference &r_weak_ref, ReportList &reports)
ID * asset_edit_id_revert(Main &global_main, ID &id, ReportList &reports)
bool asset_edit_id_delete(Main &global_main, ID &id, ReportList &reports)
bool asset_edit_id_is_writable(const ID &id)
bool asset_edit_id_is_editable(const ID &id)
bool asset_edit_id_save(Main &global_main, const ID &id, ReportList &reports)
Definition DNA_ID.h:413