diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 16b5526ca26..eff85ba4390 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -661,7 +661,6 @@ void uiDrawPanels(const struct bContext *C, struct ARegion *ar); struct Panel *uiBeginPanel(struct ScrArea *sa, struct ARegion *ar, uiBlock *block, struct PanelType *pt, int *open); void uiEndPanel(uiBlock *block, int width, int height); void uiScalePanels(struct ARegion *ar, float new_width); -void uiPanelClearType(struct wmWindowManager *wm, const struct ARegionType *art, const struct PanelType *type); /* Handlers * diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index bcd49551784..9fbf2fe8898 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -306,31 +306,6 @@ void uiEndPanel(uiBlock *block, int width, int height) } } -void uiPanelClearType(wmWindowManager *wm, const ARegionType *art, const PanelType *type) -{ - wmWindow *win; - for (win = wm->windows.first; win; win = win->next) { - ScrArea *sa; - for (sa = win->screen->areabase.first; sa; sa = sa->next) { - ARegion *ar; - for (ar = sa->regionbase.first; ar; ar = ar->next) { - if (ar->type == art) { - uiBlock *block, *nblock = ar->uiblocks.first; - while ((block = nblock)) { - nblock = block->next; - if (block->panel) { - if (block->panel->type == type) { - uiFreeBlock(block->evil_C, block); - BLI_remlink(&ar->uiblocks, block); - } - } - } - } - } - } - } -} - static void ui_offset_panel_block(uiBlock *block) { uiStyle *style = UI_GetStyleDraw(); diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 020ad2c147a..d6ea53f6ab3 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -198,6 +198,8 @@ static void rna_KeyingSetInfo_unregister(Main *bmain, StructRNA *type) RNA_struct_free_extension(type, &ksi->ext); RNA_struct_free(&BLENDER_RNA, type); + WM_main_add_notifier(NC_WINDOW, NULL); + /* unlink Blender-side data */ ANIM_keyingset_info_unregister(bmain, ksi); } @@ -249,6 +251,8 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v /* add and register with other info as needed */ ANIM_keyingset_info_register(ksi); + WM_main_add_notifier(NC_WINDOW, NULL); + /* return the struct-rna added */ return ksi->ext.srna; } diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index cae9673906e..00124a82dd1 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -167,7 +167,6 @@ static void panel_draw_header(const bContext *C, Panel *pnl) static void rna_Panel_unregister(Main *bmain, StructRNA *type) { - wmWindowManager *wm; ARegionType *art; PanelType *pt = RNA_struct_blender_type_get(type); @@ -175,10 +174,6 @@ static void rna_Panel_unregister(Main *bmain, StructRNA *type) return; if (!(art = region_type_find(NULL, pt->space_type, pt->region_type))) return; - - for (wm = bmain->wm.first; wm; wm = wm->id.next) { - uiPanelClearType(wm, art, pt); - } RNA_struct_free_extension(type, &pt->ext); @@ -186,7 +181,7 @@ static void rna_Panel_unregister(Main *bmain, StructRNA *type) RNA_struct_free(&BLENDER_RNA, type); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); } static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *data, const char *identifier, @@ -256,7 +251,7 @@ static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *dat BLI_addtail(&art->paneltypes, pt); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); return pt->ext.srna; } @@ -308,7 +303,7 @@ static void rna_UIList_unregister(Main *UNUSED(bmain), StructRNA *type) RNA_struct_free(&BLENDER_RNA, type); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); } static StructRNA *rna_UIList_register(Main *bmain, ReportList *reports, void *data, const char *identifier, @@ -355,7 +350,7 @@ static StructRNA *rna_UIList_register(Main *bmain, ReportList *reports, void *da WM_uilisttype_add(ult); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); return ult->ext.srna; } @@ -402,7 +397,7 @@ static void rna_Header_unregister(Main *UNUSED(bmain), StructRNA *type) RNA_struct_free(&BLENDER_RNA, type); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); } static StructRNA *rna_Header_register(Main *bmain, ReportList *reports, void *data, const char *identifier, @@ -455,7 +450,7 @@ static StructRNA *rna_Header_register(Main *bmain, ReportList *reports, void *da BLI_addtail(&art->headertypes, ht); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); return ht->ext.srna; } @@ -525,7 +520,7 @@ static void rna_Menu_unregister(Main *UNUSED(bmain), StructRNA *type) RNA_struct_free(&BLENDER_RNA, type); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); } static char _menu_descr[RNA_DYN_DESCR_MAX]; @@ -590,7 +585,7 @@ static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data WM_menutype_add(mt); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); return mt->ext.srna; } diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 74fcd44fb38..28ba7d4f66a 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -476,7 +476,7 @@ static void rna_AddonPref_unregister(Main *UNUSED(bmain), StructRNA *type) RNA_struct_free(&BLENDER_RNA, type); /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); } static StructRNA *rna_AddonPref_register(Main *bmain, ReportList *reports, void *data, const char *identifier, @@ -523,7 +523,7 @@ static StructRNA *rna_AddonPref_register(Main *bmain, ReportList *reports, void // apt->draw = (have_function[0]) ? header_draw : NULL; /* update while blender is running */ - WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); + WM_main_add_notifier(NC_WINDOW, NULL); return apt->ext.srna; }