Skip to content

Commit

Permalink
fix: fix a bug accidentally introduced in the previous commits
Browse files Browse the repository at this point in the history
  • Loading branch information
ntamas committed Sep 8, 2024
1 parent d3fe3ab commit 8e9b5a7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/sbstudio/plugin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def find_all_3d_views(screen: Optional[str] = None) -> Iterable[SpaceView3D]:
Yields:
the 3D views that we find in the given Blender screen
"""
for space, _area in find_all_3d_views_and_their_areas(screen):
for space, _area in _find_all_3d_views_and_their_areas(screen):
yield space


Expand All @@ -47,6 +47,13 @@ def find_all_3d_views_and_their_areas(
all 3D views that we find in the given Blender screen, and their
corresponding areas, in tuples
"""
# Now that the decorator resolved the screen name, we can pass it on
return _find_all_3d_views_and_their_areas(screen)


def _find_all_3d_views_and_their_areas(
screen: Optional[str] = None,
) -> Iterable[Tuple[SpaceView3D, Area]]:
for area in screen.areas: # type: ignore
if area.type == "VIEW_3D":
for space in area.spaces:
Expand Down

0 comments on commit 8e9b5a7

Please sign in to comment.