Blender  V2.93
BKE_addon.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 #pragma once
17 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 struct ListBase;
27 struct bAddon;
28 
29 #ifdef __RNA_TYPES_H__
30 typedef struct bAddonPrefType {
31  /* type info */
32  char idname[64]; /* best keep the same size as #BKE_ST_MAXNAME */
33 
34  /* RNA integration */
35  ExtensionRNA rna_ext;
37 
38 #else
39 typedef struct bAddonPrefType bAddonPrefType;
40 #endif
41 
42 bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet);
45 
46 void BKE_addon_pref_type_init(void);
47 void BKE_addon_pref_type_free(void);
48 
49 struct bAddon *BKE_addon_new(void);
50 struct bAddon *BKE_addon_find(struct ListBase *addon_list, const char *module);
51 struct bAddon *BKE_addon_ensure(struct ListBase *addon_list, const char *module);
52 bool BKE_addon_remove_safe(struct ListBase *addon_list, const char *module);
53 void BKE_addon_free(struct bAddon *addon);
54 
55 #ifdef __cplusplus
56 }
57 #endif
bAddonPrefType * BKE_addon_pref_type_find(const char *idname, bool quiet)
Definition: addon.c:96
struct bAddonPrefType bAddonPrefType
Definition: BKE_addon.h:39
void BKE_addon_pref_type_free(void)
Definition: addon.c:135
void BKE_addon_pref_type_add(bAddonPrefType *apt)
Definition: addon.c:119
void BKE_addon_pref_type_init(void)
Definition: addon.c:129
struct bAddon * BKE_addon_new(void)
Definition: addon.c:47
struct bAddon * BKE_addon_find(struct ListBase *addon_list, const char *module)
Definition: addon.c:53
void BKE_addon_pref_type_remove(const bAddonPrefType *apt)
Definition: addon.c:124
void BKE_addon_free(struct bAddon *addon)
Definition: addon.c:80
struct bAddon * BKE_addon_ensure(struct ListBase *addon_list, const char *module)
Definition: addon.c:58
bool BKE_addon_remove_safe(struct ListBase *addon_list, const char *module)
Definition: addon.c:69
static struct PyModuleDef module