One Logo Pool Ball
USDKit · IOS API REFERENCE

USDLayer.Path

struct · iOS 27.0+ · SDK 27.1

struct Path

A path within a USD scene hierarchy. Paths identify scene elements — prims like `/World/Character`, properties like `/World/Character.visibility`, and other addressable targets. Absolute paths begin with `/`; relative paths do not.

Members (33)

get · iOS 27.0+

primPath

TypeScript
get primPath(): USDLayer_Path
Swift declaration
var primPath: USDLayer.Path { get }

The containing prim path, stripped of any property, target, or variant selection elements.

get · iOS 27.0+

isAbsolute

TypeScript
get isAbsolute(): boolean
Swift declaration
var isAbsolute: Bool { get }

Whether the path begins with `/`.

get · iOS 27.0+

isRootPrim

TypeScript
get isRootPrim(): boolean
Swift declaration
var isRootPrim: Bool { get }

Whether the path is a top-level prim like a child of the absolute root.

init · iOS 27.0+

init

TypeScript
static initValidating(path: string): (USDLayer_Path) | null
Swift declaration
init?(validating path: String)

Creates a path from its string representation, validating that `path` is well-formed. - Parameter path: The path string to validate. - Returns: `nil` if `path` cannot be parsed as a USD path expression.

get · iOS 27.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 27.0+

absoluteRoot

TypeScript
static get absoluteRoot(): USDLayer_Path
Swift declaration
static let absoluteRoot: USDLayer.Path

The absolute root, `/`.

method · iOS 27.0+

commonPrefix

TypeScript
commonPrefix(other: USDLayer_Path): USDLayer_Path
Swift declaration
func commonPrefix(with other: USDLayer.Path) -> USDLayer.Path

Returns the longest common ancestor path of this path and `other`. - Parameter other: The path to compare against. - Returns: The longest path that is a prefix of both.

init · iOS 27.0+

init

TypeScript
static initStringLiteral(stringLiteral: string): USDLayer_Path
Swift declaration
init(stringLiteral: String)

Creates an instance initialized to the given string value. - Parameter value: The value of the new instance.

get · iOS 27.0+

isPrimProperty

TypeScript
get isPrimProperty(): boolean
Swift declaration
var isPrimProperty: Bool { get }

Whether the path is a property on a prim, as opposed to one on a relationship target.

get · iOS 27.0+

variantSelection

TypeScript
get variantSelection(): ({ "set": string; "variant": string }) | null
Swift declaration
var variantSelection: (set: String, variant: String)? { get }

The variant set and value if the path's leaf is a variant selection, otherwise `nil`.

get · iOS 27.0+

isNamespacedProperty

TypeScript
get isNamespacedProperty(): boolean
Swift declaration
var isNamespacedProperty: Bool { get }

Whether the leaf property name contains a namespace.

get · iOS 27.0+

isRelationalAttribute

TypeScript
get isRelationalAttribute(): boolean
Swift declaration
var isRelationalAttribute: Bool { get }

Whether the path is an attribute on a relationship target.

method · iOS 27.0+

strippingAllVariantSelections

TypeScript
strippingAllVariantSelections(): USDLayer_Path
Swift declaration
func strippingAllVariantSelections() -> USDLayer.Path

Returns a new path with all variant selections removed. - Returns: A new path stripped of variant selections.

get · iOS 27.0+

kind

TypeScript
get kind(): USDLayer_Path_Kind
Swift declaration
var kind: USDLayer.Path.Kind { get }

What kind of element the path's leaf represents.

get · iOS 27.0+

name

TypeScript
get name(): USDToken
Swift declaration
var name: USDToken { get }

The identifier of the path's leaf element.

get · iOS 27.0+

depth

TypeScript
get depth(): number
Swift declaration
var depth: Int { get }

The number of components in the path.

get · iOS 27.0+

empty

TypeScript
static get empty(): USDLayer_Path
Swift declaration
static let empty: USDLayer.Path

The empty path.

get · iOS 27.0+

parent

TypeScript
get parent(): (USDLayer_Path) | null
Swift declaration
var parent: USDLayer.Path? { get }

The parent of this path, or `nil` if this path is the absolute root or the empty path.

get · iOS 27.0+

target

TypeScript
get target(): (USDLayer_Path) | null
Swift declaration
var target: USDLayer.Path? { get }

The target component if the path contains one, otherwise `nil`.

method · iOS 27.0+

absolute

TypeScript
absolute(anchor: USDLayer_Path): USDLayer_Path
Swift declaration
func absolute(at anchor: USDLayer.Path) -> USDLayer.Path

Returns this path made absolute, anchored at the given path. - Parameter anchor: The absolute path to use as the anchor. - Returns: An absolute version of this path.

method · iOS 27.0+

relative

TypeScript
relative(anchor: USDLayer_Path): USDLayer_Path
Swift declaration
func relative(to anchor: USDLayer.Path) -> USDLayer.Path

Returns this path made relative to the given anchor. - Parameter anchor: The path to make this path relative to. - Returns: A relative version of this path.

get · iOS 27.0+

ancestors

TypeScript
get ancestors(): Array<USDLayer_Path>
Swift declaration
var ancestors: [USDLayer.Path] { get }

All ancestor paths from leaf to root, excluding self.

method · iOS 27.0+

appending

TypeScript
appendingVariantSetVariant(variantSet: USDToken, variant: USDToken): USDLayer_Path
Swift declaration
func appending(variantSet: USDToken, variant: USDToken) -> USDLayer.Path

Returns a new path with a variant selection appended. - Parameters: - variantSet: The variant set name. - variant: The selected variant name. - Returns: A new path with the variant selection appended.

method · iOS 27.0+

appending

TypeScript
appendingRelationalAttribute(name: USDToken): USDLayer_Path
Swift declaration
func appending(relationalAttribute name: USDToken) -> USDLayer.Path

Returns a new path with a relational attribute appended. - Parameter name: The attribute's name. - Returns: A new path identifying the relational attribute.

method · iOS 27.0+

appending

TypeScript
appendingPath(newSuffix: USDLayer_Path): USDLayer_Path
Swift declaration
func appending(path newSuffix: USDLayer.Path) -> USDLayer.Path

Returns a new path with `newSuffix` appended. - Parameter newSuffix: The path suffix to append. - Returns: A new path consisting of `self` followed by `newSuffix`.

method · iOS 27.0+

appending

TypeScript
appendingChild(name: USDToken): USDLayer_Path
Swift declaration
func appending(child name: USDToken) -> USDLayer.Path

Returns a new path with the named child prim appended. - Parameter name: The child prim's name. - Returns: A new path identifying the child prim.

method · iOS 27.0+

appending

TypeScript
appendingTarget(name: USDLayer_Path): USDLayer_Path
Swift declaration
func appending(target name: USDLayer.Path) -> USDLayer.Path

Returns a new path with a relationship target appended. - Parameter targetName: The target path. - Returns: A new path identifying the relationship target.

method · iOS 27.0+

appending

TypeScript
appendingProperty(name: USDToken): USDLayer_Path
Swift declaration
func appending(property name: USDToken) -> USDLayer.Path

Returns a new path with the named property appended. - Parameter name: The property's name. - Returns: A new path identifying the property.

method · iOS 27.0+

hasPrefix

TypeScript
hasPrefix(prefix: USDLayer_Path): boolean
Swift declaration
func hasPrefix(_ prefix: USDLayer.Path) -> Bool

Returns a Boolean value that indicates whether this path begins with `prefix`. - Parameter prefix: The candidate prefix path. - Returns: `true` if this path is rooted at `prefix`; otherwise, `false`.

method · iOS 27.0+

replacing

TypeScript
replacingName(newName: USDToken): USDLayer_Path
Swift declaration
func replacing(name newName: USDToken) -> USDLayer.Path

Returns a new path with the leaf name replaced. - Parameter newName: The new leaf name. - Returns: A new path with `newName` as its leaf.

method · iOS 27.0+

replacing

TypeScript
replacingTarget(newTarget: USDLayer_Path): USDLayer_Path
Swift declaration
func replacing(target newTarget: USDLayer.Path) -> USDLayer.Path

Returns a new path with the target component replaced. - Parameter newTarget: The new target path. - Returns: A new path with the target component replaced.

init · iOS 27.0+

init

TypeScript
static init(): USDLayer_Path
Swift declaration
init()

Creates an empty path.

init · iOS 27.0+

init

TypeScript
static init11239(path: string): USDLayer_Path
Swift declaration
init(_ path: String)

Creates a path from its string representation. - Parameter path: The path string.

Skipped declarations

No declarations were skipped in this snapshot.

All USDKit types →