Blender V5.0
asset_library_reference_enum.cc File Reference
#include "BLI_listbase.h"
#include "BKE_preferences.h"
#include "DNA_userdef_types.h"
#include "UI_resources.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "ED_asset_library.hh"

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::asset

Functions

int blender::ed::asset::library_reference_to_enum_value (const AssetLibraryReference *library)
AssetLibraryReference blender::ed::asset::library_reference_from_enum_value (int value)
static void blender::ed::asset::rna_enum_add_custom_libraries (EnumPropertyItem **item, int *totitem)
const EnumPropertyItemblender::ed::asset::library_reference_to_rna_enum_itemf (bool include_readonly, bool include_current_file)
const EnumPropertyItemblender::ed::asset::custom_libraries_rna_enum_itemf ()

Detailed Description

Helpers to convert asset library references from and to enum values and RNA enums. In some cases it's simply not possible to reference an asset library with #AssetLibraryReferences. This API guarantees a safe translation to indices/enum values for as long as there is no change in the order of registered custom asset libraries.

Definition in file asset_library_reference_enum.cc.