Skip to content

Commit

Permalink
find_all_by_itemtype
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 8, 2024
1 parent 25fa515 commit efb4afb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/compas/scene/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,11 @@ def find_by_itemtype(self, itemtype):
for obj in self.objects:
if isinstance(obj.item, itemtype):
return obj

def find_all_by_itemtype(self, itemtype):
# type: (Type[compas.data.Data]) -> list[SceneObject]
sceneobjects = []
for obj in self.objects:
if isinstance(obj.item, itemtype):
sceneobjects.append(obj)
return sceneobjects

0 comments on commit efb4afb

Please sign in to comment.