Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/space_view3d.c
| Show First 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | bool ED_view3d_area_user_region(const ScrArea *area, const View3D *v3d, ARegion **r_region) | ||||
| RegionView3D *rv3d = NULL; | RegionView3D *rv3d = NULL; | ||||
| ARegion *region_unlock_user = NULL; | ARegion *region_unlock_user = NULL; | ||||
| ARegion *region_unlock = NULL; | ARegion *region_unlock = NULL; | ||||
| const ListBase *region_list = (v3d == area->spacedata.first) ? &area->regionbase : | const ListBase *region_list = (v3d == area->spacedata.first) ? &area->regionbase : | ||||
| &v3d->regionbase; | &v3d->regionbase; | ||||
| BLI_assert(v3d->spacetype == SPACE_VIEW3D); | BLI_assert(v3d->spacetype == SPACE_VIEW3D); | ||||
| for (ARegion *region = region_list->first; region; region = region->next) { | LISTBASE_FOREACH (ARegion *, region, region_list) { | ||||
| /* find the first unlocked rv3d */ | /* find the first unlocked rv3d */ | ||||
| if (region->regiondata && region->regiontype == RGN_TYPE_WINDOW) { | if (region->regiondata && region->regiontype == RGN_TYPE_WINDOW) { | ||||
| rv3d = region->regiondata; | rv3d = region->regiondata; | ||||
| if ((rv3d->viewlock & RV3D_LOCK_ROTATION) == 0) { | if ((rv3d->viewlock & RV3D_LOCK_ROTATION) == 0) { | ||||
| region_unlock = region; | region_unlock = region; | ||||
| if (rv3d->persp == RV3D_PERSP || rv3d->persp == RV3D_CAMOB) { | if (rv3d->persp == RV3D_PERSP || rv3d->persp == RV3D_CAMOB) { | ||||
| region_unlock_user = region; | region_unlock_user = region; | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 1,523 Lines • Show Last 20 Lines | |||||