[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53680] trunk/blender/source/blender: remove uiPanelClearType(), instead redraw all windows when registering/ unregistering.
Campbell Barton
ideasman42 at gmail.com
Wed Jan 9 14:15:25 CET 2013
Revision: 53680
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53680
Author: campbellbarton
Date: 2013-01-09 13:15:23 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
remove uiPanelClearType(), instead redraw all windows when registering/unregistering.
Modified Paths:
--------------
trunk/blender/source/blender/editors/include/UI_interface.h
trunk/blender/source/blender/editors/interface/interface_panel.c
trunk/blender/source/blender/makesrna/intern/rna_animation.c
trunk/blender/source/blender/makesrna/intern/rna_ui.c
trunk/blender/source/blender/makesrna/intern/rna_userdef.c
Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_interface.h 2013-01-09 12:26:36 UTC (rev 53679)
+++ trunk/blender/source/blender/editors/include/UI_interface.h 2013-01-09 13:15:23 UTC (rev 53680)
@@ -661,7 +661,6 @@
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
*
Modified: trunk/blender/source/blender/editors/interface/interface_panel.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_panel.c 2013-01-09 12:26:36 UTC (rev 53679)
+++ trunk/blender/source/blender/editors/interface/interface_panel.c 2013-01-09 13:15:23 UTC (rev 53680)
@@ -306,31 +306,6 @@
}
}
-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();
Modified: trunk/blender/source/blender/makesrna/intern/rna_animation.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_animation.c 2013-01-09 12:26:36 UTC (rev 53679)
+++ trunk/blender/source/blender/makesrna/intern/rna_animation.c 2013-01-09 13:15:23 UTC (rev 53680)
@@ -198,6 +198,8 @@
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 @@
/* 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;
}
Modified: trunk/blender/source/blender/makesrna/intern/rna_ui.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui.c 2013-01-09 12:26:36 UTC (rev 53679)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui.c 2013-01-09 13:15:23 UTC (rev 53680)
@@ -167,7 +167,6 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
}
Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2013-01-09 12:26:36 UTC (rev 53679)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2013-01-09 13:15:23 UTC (rev 53680)
@@ -476,7 +476,7 @@
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 @@
// 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;
}
More information about the Bf-blender-cvs
mailing list