diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-20 07:44:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-20 07:44:03 +0300 |
commit | 283bac0073490c5e0b6323f8cffeab1d1b816b3a (patch) | |
tree | af3a7630a438cb97bc54baa81ca623b520fc95de /source/creator | |
parent | 733b736e9e790f199e6926ecf2d8c8bbdd3df27b (diff) |
fix for --addons startup argument, string length was too short.
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/creator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 5b5c0b77022..6c2ba5bc674 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -944,10 +944,10 @@ static int set_addons(int argc, const char **argv, void *data) /* workaround for scripts not getting a bpy.context.scene, causes internal errors elsewhere */ if (argc > 1) { #ifdef WITH_PYTHON - const int slen= strlen(argv[1]) + 10; + const int slen= strlen(argv[1]) + 128; char *str= malloc(slen); bContext *C= data; - BLI_snprintf(str, slen, "[__import__('addon_utils').enable(i) for i in '%s'.split(',')]", argv[1]); + BLI_snprintf(str, slen, "[__import__('addon_utils').enable(i, default_set=False) for i in '%s'.split(',')]", argv[1]); BPY_CTX_SETUP(BPY_string_exec(C, str)); free(str); #else |