diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-23 17:31:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-23 21:52:47 +0300 |
commit | 85c1e61375532e91d5fc37b1d754cf76c17f7721 (patch) | |
tree | 459ed56b972e108036dc1c7e097003f2b234fdd7 /source/blender/blenkernel | |
parent | 2fa231a86b4179ed513da2469df877497b346162 (diff) |
UI: Add user defined context menu
- Add/Remove from RMB context menu.
- Stored in user preferences.
- Access from Q key.
See T55027.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 1b42ce97940..d2c2f9a254f 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -121,9 +121,6 @@ typedef struct SpaceType { /* region type definitions */ ListBase regiontypes; - /* tool shelf definitions */ - ListBase toolshelf; - /* read and write... */ /* default keymaps to add */ diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index c366d822648..7b41bb62872 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -241,6 +241,15 @@ void BKE_blender_userdef_data_free(UserDef *userdef, bool clear_fonts) BLI_freelistN(&userdef->uifonts); BLI_freelistN(&userdef->themes); + for (bUserMenuItem *umi = userdef->user_menu_items.first, *umi_next; umi; umi = umi_next) { + umi_next = umi->next; + if (umi->prop) { + IDP_FreeProperty(umi->prop); + MEM_freeN(umi->prop); + } + MEM_freeN(umi); + } + #undef U } diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 5a6c55a9fcc..4a840b5ffbe 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -88,8 +88,6 @@ static void spacetype_free(SpaceType *st) } BLI_freelistN(&st->regiontypes); - BLI_freelistN(&st->toolshelf); - } void BKE_spacetypes_free(void) |