Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c
| Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * \param C: May be NULL. | * \param C: May be NULL. | ||||
| */ | */ | ||||
| static void gizmotype_unlink(bContext *C, Main *bmain, wmGizmoType *gzt) | static void gizmotype_unlink(bContext *C, Main *bmain, wmGizmoType *gzt) | ||||
| { | { | ||||
| /* Free instances. */ | /* Free instances. */ | ||||
| for (bScreen *sc = bmain->screens.first; sc; sc = sc->id.next) { | for (bScreen *sc = bmain->screens.first; sc; sc = sc->id.next) { | ||||
| for (ScrArea *area = sc->areabase.first; area; area = area->next) { | LISTBASE_FOREACH (ScrArea *, area, &sc->areabase) { | ||||
| for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { | LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { | ||||
| ListBase *lb = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase; | ListBase *lb = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase; | ||||
| for (ARegion *region = lb->first; region; region = region->next) { | LISTBASE_FOREACH (ARegion *, region, lb) { | ||||
| wmGizmoMap *gzmap = region->gizmo_map; | wmGizmoMap *gzmap = region->gizmo_map; | ||||
| if (gzmap) { | if (gzmap) { | ||||
| wmGizmoGroup *gzgroup; | wmGizmoGroup *gzgroup; | ||||
| for (gzgroup = gzmap->groups.first; gzgroup; gzgroup = gzgroup->next) { | for (gzgroup = gzmap->groups.first; gzgroup; gzgroup = gzgroup->next) { | ||||
| for (wmGizmo *gz = gzgroup->gizmos.first, *gz_next; gz; gz = gz_next) { | for (wmGizmo *gz = gzgroup->gizmos.first, *gz_next; gz; gz = gz_next) { | ||||
| gz_next = gz->next; | gz_next = gz->next; | ||||
| BLI_assert(gzgroup->parent_gzmap == gzmap); | BLI_assert(gzgroup->parent_gzmap == gzmap); | ||||
| if (gz->type == gzt) { | if (gz->type == gzt) { | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||