<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNSceneSource/entries(passingTest:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNSceneSource(im)entriesPassingTest:"
  },
  "title" : "entries(passingTest:)"
}
-->

# entries(passingTest:)

Loads and returns all objects in the scene source that pass the test in a given block.

```
func entries(passingTest predicate: (Any, String, UnsafeMutablePointer<ObjCBool>) -> Bool) -> [Any]
```

## Parameters

`predicate`

The block to be applied to each object in the scene source.

    The block takes three parameters:

- entry: The object to be tested.
- identifier: The unique identifier of the object in the scene source.
- stop: A reference to a Boolean value. Set `*stop` to <doc://com.apple.documentation/documentation/Swift/true> within the block to abort further processing of the scene source’s contents.

    The block returns a Boolean value indicating whether the entry object passed the test and should be included in the method’s returned array.

## Return Value

An array of SceneKit objects from the scene source that pass the test.

## Discussion

SceneKit recognizes objects of the following classes in scene files:

- <doc://com.apple.documentation/documentation/QuartzCore/CAAnimation>
- <doc://com.apple.documentation/documentation/AppKit/NSImage>
- [`SCNCamera`](/documentation/SceneKit/SCNCamera)
- [`SCNGeometry`](/documentation/SceneKit/SCNGeometry)
- [`SCNLight`](/documentation/SceneKit/SCNLight)
- [`SCNMaterial`](/documentation/SceneKit/SCNMaterial)
- [`SCNMorpher`](/documentation/SceneKit/SCNMorpher)
- [`SCNNode`](/documentation/SceneKit/SCNNode)
- [`SCNScene`](/documentation/SceneKit/SCNScene)
- [`SCNSkinner`](/documentation/SceneKit/SCNSkinner)

Each object in a scene file has an identifier that is unique for its class. These identifiers are determined by the software that created the scene file—for example, they may be descriptive names assigned by an artist using 3D authoring tools. For SceneKit classes with a [`name`](/documentation/SceneKit/SCNNode/name) property (such as nodes and geometries), the name of an object loaded from a scene file is based on its identifier in the scene file.

Use this method to selectively load objects from a scene source matching criteria you specify. For example, the following code loads from a scene file only the nodes that have attached geometry:

```objc
NSArray *geometryNodes = [sceneSource entriesPassingTest:^BOOL(id entry, NSString *identifier, BOOL *stop) {
    if ([entry isKindOfClass:[SCNNode class]]) {
        SCNNode *node = (SCNNode *)entry;
        return (node.geometry != nil);
    } else {
        return NO;
    }
}];
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)