<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDLayer/PathExpression",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDLayerV14PathExpressionV"
  },
  "title" : "USDLayer.PathExpression"
}
-->

# USDLayer.PathExpression

A boolean expression over path patterns for selecting sets of prims.

```
struct PathExpression
```

## Overview

Path expressions combine patterns using set operations (union,
intersection, complement, difference) and can reference other named
expressions. The struct wraps `pxr::SdfPathExpression` and provides
access to common expression patterns through static properties and
string-based initialization.

## Topics

### Initializers

[`init()`](/documentation/USDKit/USDLayer/PathExpression/init())

Creates an empty path expression.

[`init(String)`](/documentation/USDKit/USDLayer/PathExpression/init(_:))

Creates a path expression by parsing the given string.

### Instance Properties

[`var isEmpty: Bool`](/documentation/USDKit/USDLayer/PathExpression/isEmpty)

Whether this expression has no patterns or references.

[`var text: String`](/documentation/USDKit/USDLayer/PathExpression/text)

The string form of this expression.

### Type Properties

[`static var everyDescendant: USDLayer.PathExpression`](/documentation/USDKit/USDLayer/PathExpression/everyDescendant)

An expression that matches all descendant paths from the root.

[`static var everything: USDLayer.PathExpression`](/documentation/USDKit/USDLayer/PathExpression/everything)

An expression that matches all paths in the scene hierarchy.

[`static var nothing: USDLayer.PathExpression`](/documentation/USDKit/USDLayer/PathExpression/nothing)

An expression that matches no paths, representing an empty selection.

[`static var weakerReference: USDLayer.PathExpression`](/documentation/USDKit/USDLayer/PathExpression/weakerReference)

A reference to a weaker expression for composition with stronger layers.

## Relationships

### Conforms To

[`Escapable`](/documentation/Swift/Escapable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`Copyable`](/documentation/Swift/Copyable)

[`USDValueProtocol`](/documentation/USDKit/USDValueProtocol)

[`ExpressibleByStringLiteral`](/documentation/Swift/ExpressibleByStringLiteral)

[`Value`](/documentation/USDKit/USDPrim/Attribute/Value)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`ExpressibleByUnicodeScalarLiteral`](/documentation/Swift/ExpressibleByUnicodeScalarLiteral)

[`ExpressibleByExtendedGraphemeClusterLiteral`](/documentation/Swift/ExpressibleByExtendedGraphemeClusterLiteral)

---

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)