diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-03-20 16:37:44 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-03-20 16:37:44 +0300 |
commit | 21b361194fb4465ddb9590d1c784820b926bebe7 (patch) | |
tree | dbce9a151032620b2c6a3a7e48e8eda796bea020 /source | |
parent | a6d4ac28f56b5470ae7492a1cea7e3967e1fb836 (diff) | |
parent | 6b86b446d3b8a2ab40bed8fc7b5aacd583584d52 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 35 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawarmature.c | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 2 |
3 files changed, 25 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 1febeebf9ea..f661f18fbc0 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -157,17 +157,10 @@ void BKE_blender_userdef_set_data(UserDef *userdef) U = *userdef; } -/** - * When loading a new userdef from file, - * or when exiting Blender. - */ -void BKE_blender_userdef_free_data(UserDef *userdef) +static void userdef_free_keymaps(UserDef *userdef) { -#define U _invalid_access_ /* ensure no accidental global access */ -#ifdef U /* quiet warning */ -#endif - - for (wmKeyMap *km = userdef->user_keymaps.first; km; km = km->next) { + for (wmKeyMap *km = userdef->user_keymaps.first, *km_next; km; km = km_next) { + km_next = km->next; for (wmKeyMapDiffItem *kmdi = km->diff_items.first; kmdi; kmdi = kmdi->next) { if (kmdi->add_item) { keymap_item_free(kmdi->add_item); @@ -185,8 +178,14 @@ void BKE_blender_userdef_free_data(UserDef *userdef) BLI_freelistN(&km->diff_items); BLI_freelistN(&km->items); + + MEM_freeN(km); } + BLI_listbase_clear(&userdef->user_keymaps); +} +static void userdef_free_addons(UserDef *userdef) +{ for (bAddon *addon = userdef->addons.first, *addon_next; addon; addon = addon_next) { addon_next = addon->next; if (addon->prop) { @@ -195,6 +194,21 @@ void BKE_blender_userdef_free_data(UserDef *userdef) } MEM_freeN(addon); } + BLI_listbase_clear(&userdef->addons); +} + +/** + * When loading a new userdef from file, + * or when exiting Blender. + */ +void BKE_blender_userdef_free_data(UserDef *userdef) +{ +#define U _invalid_access_ /* ensure no accidental global access */ +#ifdef U /* quiet warning */ +#endif + + userdef_free_keymaps(userdef); + userdef_free_addons(userdef); for (uiFont *font = userdef->uifonts.first; font; font = font->next) { BLF_unload_id(font->blf_id); @@ -207,7 +221,6 @@ void BKE_blender_userdef_free_data(UserDef *userdef) BLI_freelistN(&userdef->uistyles); BLI_freelistN(&userdef->uifonts); BLI_freelistN(&userdef->themes); - BLI_freelistN(&userdef->user_keymaps); #undef U } diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index d61058744d0..b0e82877241 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -2578,7 +2578,6 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt) /* Draw name */ if (arm->flag & ARM_DRAWNAMES) { mid_v3_v3v3(vec, eBone->head, eBone->tail); - glRasterPos3fv(vec); view3d_cached_text_draw_add(vec, eBone->name, strlen(eBone->name), 10, 0, col); } /* Draw additional axes */ diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 5292ab83cde..61645d8a091 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1469,7 +1469,7 @@ void WM_OT_read_homefile(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); /* So the splash can be kept open after loading a file (for templates). */ - prop = RNA_def_boolean(ot->srna, "use_splash", true, "Splash", ""); + prop = RNA_def_boolean(ot->srna, "use_splash", false, "Splash", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); /* omit poll to run in background mode */ |