Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_wm_gizmo.c
| Show All 20 Lines | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "DNA_view3d_types.h" | #include "DNA_view3d_types.h" | ||||
| #include "DNA_windowmanager_types.h" | #include "DNA_windowmanager_types.h" | ||||
| #include "BLI_listbase.h" | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| ▲ Show 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| # if 0 | # if 0 | ||||
| wmWindowManager *wm = (wmWindowManager *)ptr->owner_id; | wmWindowManager *wm = (wmWindowManager *)ptr->owner_id; | ||||
| # endif | # endif | ||||
| /* We could try workaruond this lookup, but not trivial. */ | /* We could try workaruond this lookup, but not trivial. */ | ||||
| for (bScreen *screen = G_MAIN->screens.first; screen; screen = screen->id.next) { | for (bScreen *screen = G_MAIN->screens.first; screen; screen = screen->id.next) { | ||||
| IDProperty *properties = ptr->data; | IDProperty *properties = ptr->data; | ||||
| for (ScrArea *area = screen->areabase.first; area; area = area->next) { | LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | ||||
| for (ARegion *region = area->regionbase.first; region; region = region->next) { | LISTBASE_FOREACH (ARegion *, region, &area->regionbase) { | ||||
| if (region->gizmo_map) { | if (region->gizmo_map) { | ||||
| wmGizmoMap *gzmap = region->gizmo_map; | wmGizmoMap *gzmap = region->gizmo_map; | ||||
| for (wmGizmoGroup *gzgroup = WM_gizmomap_group_list(gzmap)->first; gzgroup; | LISTBASE_FOREACH (wmGizmoGroup *, gzgroup, WM_gizmomap_group_list(gzmap)) { | ||||
| gzgroup = gzgroup->next) { | LISTBASE_FOREACH (wmGizmo *, gz, &gzgroup->gizmos) { | ||||
| for (wmGizmo *gz = gzgroup->gizmos.first; gz; gz = gz->next) { | |||||
| if (gz->properties == properties) { | if (gz->properties == properties) { | ||||
| return gz; | return gz; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,223 Lines • Show Last 20 Lines | |||||