Blender V5.3
idtype.cc File Reference
#include <array>
#include <cstring>
#include "BLI_ghash.hh"
#include "BLI_utildefines.hh"
#include "BLT_translation.hh"
#include "DNA_ID.h"
#include "DNA_collection_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "BKE_node.hh"
#include "BKE_idtype.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define INIT_TYPE(_id_code)
#define CASE_IDINDEX(_id)
#define CASE_IDINDEX(_id)

Functions

uint blender::BKE_idtype_cache_key_hash (const void *key_v)
bool blender::BKE_idtype_cache_key_cmp (const void *key_a_v, const void *key_b_v)
static bool blender::id_type_is_valid (const IDTypeInfo &id_type)
static void blender::id_type_init ()
void blender::BKE_idtype_init ()
const IDTypeInfo * blender::BKE_idtype_get_info_from_idtype_index (const int idtype_index)
const IDTypeInfo * blender::BKE_idtype_get_info_from_idcode (short id_code)
const IDTypeInfo * blender::BKE_idtype_get_info_from_id (const ID *id)
static const IDTypeInfo * blender::idtype_get_info_from_name (const char *idtype_name)
static const IDTypeInfo * blender::idtype_get_info_from_name_case_insensitive (const char *idtype_name)
const char * blender::BKE_idtype_idcode_to_name (short idcode)
const char * blender::BKE_idtype_idcode_to_name_plural (short idcode)
const char * blender::BKE_idtype_idcode_to_translation_context (short idcode)
short blender::BKE_idtype_idcode_from_name (const char *idtype_name)
short blender::BKE_idtype_idcode_from_name_case_insensitive (const char *idtype_name)
const char * blender::BKE_idtype_name_normalize (const char *idtype_name)
bool blender::BKE_idtype_idcode_is_valid (short idcode)
bool blender::BKE_idtype_idcode_is_linkable (short idcode)
bool blender::BKE_idtype_idcode_is_only_appendable (short idcode)
bool blender::BKE_idtype_idcode_append_is_reusable (short idcode)
int blender::BKE_idtype_idcode_to_index (short idcode)
int blender::BKE_idtype_idfilter_to_index (uint64_t id_filter)
short blender::BKE_idtype_index_to_idcode (int idtype_index)
uint64_t blender::BKE_idtype_index_to_idfilter (int idtype_index)
uint64_t blender::BKE_idtype_idcode_to_idfilter (short idcode)
short blender::BKE_idtype_idfilter_to_idcode (uint64_t idfilter)
short blender::BKE_idtype_idcode_iter_step (int *idtype_index)
void blender::BKE_idtype_id_foreach_cache (ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data)

Variables

static std::array< IDTypeInfo *, INDEX_ID_MAX > blender::id_types

Macro Definition Documentation

◆ CASE_IDINDEX [1/2]

#define CASE_IDINDEX ( _id)
Value:
case FILTER_ID_##_id: \
return INDEX_ID_##_id

◆ CASE_IDINDEX [2/2]

#define CASE_IDINDEX ( _id)
Value:
case ID_##_id: \
return INDEX_ID_##_id

Referenced by blender::BKE_idtype_idcode_to_index(), and blender::BKE_idtype_idfilter_to_index().

◆ INIT_TYPE

#define INIT_TYPE ( _id_code)
Value:
{ \
BLI_assert(IDType_##_id_code.main_listbase_index == INDEX_##_id_code); \
BLI_assert(id_type_is_valid(IDType_##_id_code)); \
id_types[INDEX_##_id_code] = &IDType_##_id_code; \
init_types_num++; \
} \
(void)0

Referenced by blender::id_type_init(), blender::modifier_type_init(), and blender::seq::modifier_types_init().