Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ui.c
| Show All 21 Lines | |||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BLI_listbase.h" | |||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "WM_toolsystem.h" | #include "WM_toolsystem.h" | ||||
| ▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | static void rna_Panel_unregister(Main *bmain, StructRNA *type) | ||||
| if (pt->parent) { | if (pt->parent) { | ||||
| LinkData *link = BLI_findptr(&pt->parent->children, pt, offsetof(LinkData, data)); | LinkData *link = BLI_findptr(&pt->parent->children, pt, offsetof(LinkData, data)); | ||||
| BLI_freelinkN(&pt->parent->children, link); | BLI_freelinkN(&pt->parent->children, link); | ||||
| } | } | ||||
| WM_paneltype_remove(pt); | WM_paneltype_remove(pt); | ||||
| for (LinkData *link = pt->children.first; link; link = link->next) { | LISTBASE_FOREACH (LinkData *, link, &pt->children) { | ||||
| PanelType *child_pt = link->data; | PanelType *child_pt = link->data; | ||||
| child_pt->parent = NULL; | child_pt->parent = NULL; | ||||
| } | } | ||||
| const char space_type = pt->space_type; | const char space_type = pt->space_type; | ||||
| BLI_freelistN(&pt->children); | BLI_freelistN(&pt->children); | ||||
| BLI_freelinkN(&art->paneltypes, pt); | BLI_freelinkN(&art->paneltypes, pt); | ||||
| for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | ||||
| for (ScrArea *area = screen->areabase.first; area; area = area->next) { | LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | ||||
| for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { | LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { | ||||
| if (sl->spacetype == space_type) { | if (sl->spacetype == space_type) { | ||||
| ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : | ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : | ||||
| &sl->regionbase; | &sl->regionbase; | ||||
| for (ARegion *region = regionbase->first; region; region = region->next) { | LISTBASE_FOREACH (ARegion *, region, regionbase) { | ||||
| if (region->type == art) { | if (region->type == art) { | ||||
| for (Panel *pa = region->panels.first; pa; pa = pa->next) { | LISTBASE_FOREACH (Panel *, pa, ®ion->panels) { | ||||
| if (pa->type == pt) { | if (pa->type == pt) { | ||||
| pa->type = NULL; | pa->type = NULL; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,495 Lines • Show Last 20 Lines | |||||