primPath
TypeScriptget primPath(): USDLayer_PathSwift declarationvar primPath: USDLayer.Path { get }The containing prim path, stripped of any property, target, or variant selection elements.
struct · iOS 27.0+ · SDK 27.1
struct PathA 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.
get primPath(): USDLayer_PathSwift declarationvar primPath: USDLayer.Path { get }The containing prim path, stripped of any property, target, or variant selection elements.
get isAbsolute(): booleanSwift declarationvar isAbsolute: Bool { get }Whether the path begins with `/`.
get isRootPrim(): booleanSwift declarationvar isRootPrim: Bool { get }Whether the path is a top-level prim like a child of the absolute root.
static initValidating(path: string): (USDLayer_Path) | nullSwift declarationinit?(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 description(): stringSwift declarationvar 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.
static get absoluteRoot(): USDLayer_PathSwift declarationstatic let absoluteRoot: USDLayer.PathThe absolute root, `/`.
commonPrefix(other: USDLayer_Path): USDLayer_PathSwift declarationfunc commonPrefix(with other: USDLayer.Path) -> USDLayer.PathReturns 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.
static initStringLiteral(stringLiteral: string): USDLayer_PathSwift declarationinit(stringLiteral: String)Creates an instance initialized to the given string value. - Parameter value: The value of the new instance.
get isPrimProperty(): booleanSwift declarationvar isPrimProperty: Bool { get }Whether the path is a property on a prim, as opposed to one on a relationship target.
get variantSelection(): ({ "set": string; "variant": string }) | nullSwift declarationvar variantSelection: (set: String, variant: String)? { get }The variant set and value if the path's leaf is a variant selection, otherwise `nil`.
get isNamespacedProperty(): booleanSwift declarationvar isNamespacedProperty: Bool { get }Whether the leaf property name contains a namespace.
get isRelationalAttribute(): booleanSwift declarationvar isRelationalAttribute: Bool { get }Whether the path is an attribute on a relationship target.
strippingAllVariantSelections(): USDLayer_PathSwift declarationfunc strippingAllVariantSelections() -> USDLayer.PathReturns a new path with all variant selections removed. - Returns: A new path stripped of variant selections.
get kind(): USDLayer_Path_KindSwift declarationvar kind: USDLayer.Path.Kind { get }What kind of element the path's leaf represents.
get name(): USDTokenSwift declarationvar name: USDToken { get }The identifier of the path's leaf element.
get depth(): numberSwift declarationvar depth: Int { get }The number of components in the path.
static get empty(): USDLayer_PathSwift declarationstatic let empty: USDLayer.PathThe empty path.
get parent(): (USDLayer_Path) | nullSwift declarationvar parent: USDLayer.Path? { get }The parent of this path, or `nil` if this path is the absolute root or the empty path.
get target(): (USDLayer_Path) | nullSwift declarationvar target: USDLayer.Path? { get }The target component if the path contains one, otherwise `nil`.
absolute(anchor: USDLayer_Path): USDLayer_PathSwift declarationfunc absolute(at anchor: USDLayer.Path) -> USDLayer.PathReturns 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.
relative(anchor: USDLayer_Path): USDLayer_PathSwift declarationfunc relative(to anchor: USDLayer.Path) -> USDLayer.PathReturns 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 ancestors(): Array<USDLayer_Path>Swift declarationvar ancestors: [USDLayer.Path] { get }All ancestor paths from leaf to root, excluding self.
appendingVariantSetVariant(variantSet: USDToken, variant: USDToken): USDLayer_PathSwift declarationfunc appending(variantSet: USDToken, variant: USDToken) -> USDLayer.PathReturns 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.
appendingRelationalAttribute(name: USDToken): USDLayer_PathSwift declarationfunc appending(relationalAttribute name: USDToken) -> USDLayer.PathReturns a new path with a relational attribute appended. - Parameter name: The attribute's name. - Returns: A new path identifying the relational attribute.
appendingPath(newSuffix: USDLayer_Path): USDLayer_PathSwift declarationfunc appending(path newSuffix: USDLayer.Path) -> USDLayer.PathReturns a new path with `newSuffix` appended. - Parameter newSuffix: The path suffix to append. - Returns: A new path consisting of `self` followed by `newSuffix`.
appendingChild(name: USDToken): USDLayer_PathSwift declarationfunc appending(child name: USDToken) -> USDLayer.PathReturns a new path with the named child prim appended. - Parameter name: The child prim's name. - Returns: A new path identifying the child prim.
appendingTarget(name: USDLayer_Path): USDLayer_PathSwift declarationfunc appending(target name: USDLayer.Path) -> USDLayer.PathReturns a new path with a relationship target appended. - Parameter targetName: The target path. - Returns: A new path identifying the relationship target.
appendingProperty(name: USDToken): USDLayer_PathSwift declarationfunc appending(property name: USDToken) -> USDLayer.PathReturns a new path with the named property appended. - Parameter name: The property's name. - Returns: A new path identifying the property.
hasPrefix(prefix: USDLayer_Path): booleanSwift declarationfunc hasPrefix(_ prefix: USDLayer.Path) -> BoolReturns 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`.
replacingName(newName: USDToken): USDLayer_PathSwift declarationfunc replacing(name newName: USDToken) -> USDLayer.PathReturns a new path with the leaf name replaced. - Parameter newName: The new leaf name. - Returns: A new path with `newName` as its leaf.
replacingTarget(newTarget: USDLayer_Path): USDLayer_PathSwift declarationfunc replacing(target newTarget: USDLayer.Path) -> USDLayer.PathReturns a new path with the target component replaced. - Parameter newTarget: The new target path. - Returns: A new path with the target component replaced.
static init(): USDLayer_PathSwift declarationinit()Creates an empty path.
static init11239(path: string): USDLayer_PathSwift declarationinit(_ path: String)Creates a path from its string representation. - Parameter path: The path string.
No declarations were skipped in this snapshot.