diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-13 02:41:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-13 02:52:25 +0300 |
commit | af0ab15e1dd84aadb32ee8d7a836a08fe6251474 (patch) | |
tree | 4eabb3847dc1a28e68d052837d74fa5d59bc177c /source/blender/editors/screen | |
parent | 3ea7a5d8699c74ddf4ea7b359022145e44f62bc2 (diff) |
Fix T62436: New added Torus won't appear in Local View
Add Object.local_view_get/set
Alternate fix which supports removing from local view & checking
if an object is in local view.
Also avoids redundant refresh.
Matches 2.7x Object.layer_local_view capabilities more closely,
without exposing the flag directly.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 8c38ba41821..e5d23457daf 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1539,6 +1539,24 @@ Scene *ED_screen_scene_find_with_window(const bScreen *screen, const wmWindowMan return NULL; } +ScrArea *ED_screen_area_find_with_spacedata(const bScreen *screen, const SpaceLink *sl, const bool only_visible) +{ + if (only_visible) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + if (sa->spacedata.first == sl) { + return sa; + } + } + } + else { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + if (BLI_findindex(&sa->spacedata, sl) != -1) { + return sa; + } + } + } + return NULL; +} Scene *ED_screen_scene_find(const bScreen *screen, const wmWindowManager *wm) { |