Blender V5.0
addon.cc File Reference
#include <cstddef>
#include <cstdlib>
#include "RNA_types.hh"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BKE_addon.h"
#include "BKE_idprop.hh"
#include "DNA_listBase.h"
#include "DNA_userdef_types.h"
#include "MEM_guardedalloc.h"
#include "CLG_log.h"

Go to the source code of this file.

Functions

Add-on New/Free
bAddonBKE_addon_new ()
bAddonBKE_addon_find (const ListBase *addon_list, const char *module)
bAddonBKE_addon_ensure (ListBase *addon_list, const char *module)
bool BKE_addon_remove_safe (ListBase *addon_list, const char *module)
void BKE_addon_free (bAddon *addon)

Variables

static CLG_LogRef LOG = {"addon"}

Add-on Preference API

static GHashglobal_addonpreftype_hash = nullptr
bAddonPrefTypeBKE_addon_pref_type_find (const char *idname, bool quiet)
void BKE_addon_pref_type_add (bAddonPrefType *apt)
void BKE_addon_pref_type_remove (const bAddonPrefType *apt)
void BKE_addon_pref_type_init ()
void BKE_addon_pref_type_free ()

Function Documentation

◆ BKE_addon_ensure()

bAddon * BKE_addon_ensure ( ListBase * addon_list,
const char * module )

Definition at line 45 of file addon.cc.

References BKE_addon_find(), BKE_addon_new(), BLI_addtail(), bAddon::module, module, and STRNCPY().

Referenced by blo_do_versions_userdef().

◆ BKE_addon_find()

bAddon * BKE_addon_find ( const ListBase * addon_list,
const char * module )

Definition at line 40 of file addon.cc.

References BLI_findstring(), module, and offsetof.

Referenced by BKE_addon_ensure().

◆ BKE_addon_free()

void BKE_addon_free ( bAddon * addon)

Definition at line 68 of file addon.cc.

References IDP_FreeProperty(), MEM_freeN(), and bAddon::prop.

Referenced by BKE_addon_remove_safe(), and userdef_free_addons().

◆ BKE_addon_new()

bAddon * BKE_addon_new ( void )

Definition at line 34 of file addon.cc.

References MEM_callocN().

Referenced by BKE_addon_ensure(), and BKE_blendfile_userdef_from_defaults().

◆ BKE_addon_pref_type_add()

void BKE_addon_pref_type_add ( bAddonPrefType * apt)

Definition at line 107 of file addon.cc.

References BLI_ghash_insert(), and global_addonpreftype_hash.

◆ BKE_addon_pref_type_find()

bAddonPrefType * BKE_addon_pref_type_find ( const char * idname,
bool quiet )

Definition at line 84 of file addon.cc.

References BLI_ghash_lookup(), CLOG_WARN, global_addonpreftype_hash, and LOG.

◆ BKE_addon_pref_type_free()

void BKE_addon_pref_type_free ( void )

Definition at line 123 of file addon.cc.

References BLI_ghash_free(), global_addonpreftype_hash, and MEM_freeN().

Referenced by WM_exit_ex().

◆ BKE_addon_pref_type_init()

void BKE_addon_pref_type_init ( void )

Definition at line 117 of file addon.cc.

References BLI_assert, BLI_ghash_str_new(), and global_addonpreftype_hash.

Referenced by WM_init().

◆ BKE_addon_pref_type_remove()

void BKE_addon_pref_type_remove ( const bAddonPrefType * apt)

Definition at line 112 of file addon.cc.

References BLI_ghash_remove(), global_addonpreftype_hash, and MEM_freeN().

◆ BKE_addon_remove_safe()

bool BKE_addon_remove_safe ( ListBase * addon_list,
const char * module )

Definition at line 56 of file addon.cc.

References BKE_addon_free(), BLI_findstring(), BLI_remlink(), module, and offsetof.

Referenced by blo_do_versions_userdef(), and wm_init_userdef().

Variable Documentation

◆ global_addonpreftype_hash

◆ LOG

CLG_LogRef LOG = {"addon"}
static

Definition at line 28 of file addon.cc.