Skip to content

Commit efb4afb

Browse files
committed
find_all_by_itemtype
1 parent 25fa515 commit efb4afb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/compas/scene/scene.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,11 @@ def find_by_itemtype(self, itemtype):
245245
for obj in self.objects:
246246
if isinstance(obj.item, itemtype):
247247
return obj
248+
249+
def find_all_by_itemtype(self, itemtype):
250+
# type: (Type[compas.data.Data]) -> list[SceneObject]
251+
sceneobjects = []
252+
for obj in self.objects:
253+
if isinstance(obj.item, itemtype):
254+
sceneobjects.append(obj)
255+
return sceneobjects

0 commit comments

Comments
 (0)