diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-12 09:24:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-12 09:24:18 +0300 |
commit | fc97e120f69f4cf3f46d9c949897430a8ecb3bec (patch) | |
tree | 3f2e716607ff7a5b9fd483eed346d332094d2034 /source/blender/editors/interface | |
parent | a6968e87f1338081f30725f8f2ca3460e280fea2 (diff) |
BKE_addon: new/free/ensure functions
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/resources.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index d12e7cc036b..fd73ff8552a 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -45,6 +45,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" +#include "BKE_addon.h" #include "BKE_appdir.h" #include "BKE_colorband.h" #include "BKE_DerivedMesh.h" @@ -2148,11 +2149,7 @@ void init_userdef_do_versions(void) } /* enable (Cycles) addon by default */ - if (!BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module))) { - bAddon *baddon = MEM_callocN(sizeof(bAddon), "bAddon"); - BLI_strncpy(baddon->module, "cycles", sizeof(baddon->module)); - BLI_addtail(&U.addons, baddon); - } + BKE_addon_ensure(&U.addons, "cycles"); } if (!USER_VERSION_ATLEAST(260, 5)) { |