Merge branch 'master' into blender2.8
This commit is contained in:
@@ -412,7 +412,6 @@ typedef struct bTheme {
|
||||
#define UI_THEMESPACE_START(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), &((btheme)->tbuts))
|
||||
#define UI_THEMESPACE_END(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), (&((btheme)->tclip) + 1))
|
||||
|
||||
/* for the moment only the name. may want to store options with this later */
|
||||
typedef struct bAddon {
|
||||
struct bAddon *next, *prev;
|
||||
char module[64];
|
||||
|
||||
@@ -395,15 +395,17 @@ static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *p
|
||||
|
||||
static bAddon *rna_userdef_addon_new(void)
|
||||
{
|
||||
ListBase *addons_list = &U.addons;
|
||||
bAddon *bext = MEM_callocN(sizeof(bAddon), "bAddon");
|
||||
BLI_addtail(&U.addons, bext);
|
||||
BLI_addtail(addons_list, bext);
|
||||
return bext;
|
||||
}
|
||||
|
||||
static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *path_cmp_ptr)
|
||||
static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *bext_ptr)
|
||||
{
|
||||
bAddon *bext = path_cmp_ptr->data;
|
||||
if (BLI_findindex(&U.addons, bext) == -1) {
|
||||
ListBase *addons_list = &U.addons;
|
||||
bAddon *bext = bext_ptr->data;
|
||||
if (BLI_findindex(addons_list, bext) == -1) {
|
||||
BKE_report(reports, RPT_ERROR, "Add-on is no longer valid");
|
||||
return;
|
||||
}
|
||||
@@ -413,8 +415,8 @@ static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *path_cmp_p
|
||||
MEM_freeN(bext->prop);
|
||||
}
|
||||
|
||||
BLI_freelinkN(&U.addons, bext);
|
||||
RNA_POINTER_INVALIDATE(path_cmp_ptr);
|
||||
BLI_freelinkN(addons_list, bext);
|
||||
RNA_POINTER_INVALIDATE(bext_ptr);
|
||||
}
|
||||
|
||||
static bPathCompare *rna_userdef_pathcompare_new(void)
|
||||
|
||||
Reference in New Issue
Block a user