Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-02-12 09:24:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-12 09:24:18 +0300
commitfc97e120f69f4cf3f46d9c949897430a8ecb3bec (patch)
tree3f2e716607ff7a5b9fd483eed346d332094d2034 /source/blender/editors
parenta6968e87f1338081f30725f8f2ca3460e280fea2 (diff)
BKE_addon: new/free/ensure functions
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/resources.c7
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)) {