diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-31 11:02:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-31 11:02:43 +0300 |
commit | 87608e66e174068f9471619a5fe153fd279c4947 (patch) | |
tree | 6378ad65c99b8d9a0bb2f2e79900655e3c79b217 /source | |
parent | 7a868d127f394e7e4e48972fe9bcbd8a3b923c7b (diff) |
WM: correct comment, variable name for addons
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index e590e04fc6d..a7759a1d143 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -402,7 +402,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]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index c66ac26f928..489a841fb0b 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -401,15 +401,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; } @@ -419,8 +421,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) |