One Logo Pool Ball
USDKit · IOS API REFERENCE

USDPrim.Relationship.Spec

struct · iOS 27.0+ · SDK 27.1

struct Spec

A handle to a relationship definition stored in a layer. Relationships store connections to other prims (target paths) rather than typed values. Used for scene linkages like material bindings, collection membership, and proxy references.

Members (26)

get · iOS 27.0+

customData

TypeScript
get customData(): Record<string, USDValue>
Swift declaration
var customData: Dictionary<String, USDValue> { get }

The custom data dictionary authored on this relationship.

get · iOS 27.0+

noLoadHint

TypeScript
get noLoadHint(): boolean
Swift declaration
var noLoadHint: Bool { get nonmutating set }

Hint to the runtime to skip loading payloads on targeted prims. Default: `false`.

set · iOS 27.0+

noLoadHint

TypeScript
set noLoadHint(value: boolean)
Swift declaration
var noLoadHint: Bool { get nonmutating set }

Hint to the runtime to skip loading payloads on targeted prims. Default: `false`.

get · iOS 27.0+

permission

TypeScript
get permission(): USDLayer_Permission
Swift declaration
var permission: USDLayer.Permission { get nonmutating set }

The relationship's permission level (public, restricted, private).

set · iOS 27.0+

permission

TypeScript
set permission(value: USDLayer_Permission)
Swift declaration
var permission: USDLayer.Permission { get nonmutating set }

The relationship's permission level (public, restricted, private).

get · iOS 27.0+

targetPaths

TypeScript
get targetPaths(): (Array<USDLayer_Path>) | null
Swift declaration
var targetPaths: [USDLayer.Path]? { get }

The authored target paths, or `nil` if none authored.

method · iOS 27.0+

removeTarget

TypeScript
removeTarget(path: USDLayer_Path, preservingOrder?: boolean): void
Swift declaration
func removeTarget(_ path: USDLayer.Path, preservingOrder: Bool = false)

Removes an authored target path. - Parameters: - path: The target path to remove. - preservingOrder: Pass `true` to keep the relative ordering of remaining targets stable.

method · iOS 27.0+

setAssetInfo

TypeScript
setAssetInfo(key: string, value: USDValue): void
Swift declaration
func setAssetInfo(_ key: String, to value: USDValue)

Sets `key` in the asset info dictionary to `value`. Read the full dictionary via `field("assetInfo")` from FieldCollection. - Parameters: - key: The dictionary key. - value: The new value.

get · iOS 27.0+

documentation

TypeScript
get documentation(): (string) | null
Swift declaration
var documentation: String? { get nonmutating set }

The authored documentation, or `nil` if not authored.

set · iOS 27.0+

documentation

TypeScript
set documentation(value: (string) | null)
Swift declaration
var documentation: String? { get nonmutating set }

The authored documentation, or `nil` if not authored.

method · iOS 27.0+

replaceTarget

TypeScript
replaceTarget(oldPath: USDLayer_Path, newPath: USDLayer_Path): void
Swift declaration
func replaceTarget(_ oldPath: USDLayer.Path, with newPath: USDLayer.Path)

Replaces an authored target path with a new path. - Parameters: - oldPath: The existing target path. - newPath: The replacement target path.

method · iOS 27.0+

setCustomData

TypeScript
setCustomData(key: string, value: USDValue): void
Swift declaration
func setCustomData(_ key: String, to value: USDValue)

Sets `key` in the custom data dictionary to `value`. - Parameters: - key: The dictionary key. - value: The new value.

method · iOS 27.0+

clearAssetInfo

TypeScript
clearAssetInfo(key: string): void
Swift declaration
func clearAssetInfo(_ key: String)

Removes `key` from the asset info dictionary. - Parameter key: The dictionary key to clear.

method · iOS 27.0+

clearCustomData

TypeScript
clearCustomData(key: string): void
Swift declaration
func clearCustomData(_ key: String)

Removes `key` from the custom data dictionary. - Parameter key: The dictionary key to clear.

method · iOS 27.0+

clearTargetPaths

TypeScript
clearTargetPaths(): void
Swift declaration
func clearTargetPaths()

Clears all authored target paths on this relationship.

get · iOS 27.0+

name

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

The relationship's local name.

init · iOS 27.0+

init

TypeScript
static initLayerRelationshipPathVariabilityIsCustom(layer: USDLayer, relationshipPath: USDLayer_Path, variability?: USDPrim_Property_Variability, isCustom?: boolean): (USDPrim_Relationship_Spec) | null
Swift declaration
init?(layer: USDLayer, relationshipPath: USDLayer.Path, variability: USDPrim.Property.Variability = .varying, isCustom: Bool = false)

Creates a relationship spec at the given path in the layer, authoring intermediate ancestor prim specs as `over`s where needed. - Parameters: - layer: The layer that owns the new relationship. - relationshipPath: The full path of the relationship to author. - variability: The relationship's variability. - isCustom: Whether the relationship is authored as `custom`.

init · iOS 27.0+

init

TypeScript
static initOwnerNameVariabilityIsCustom(owner: USDPrim_Spec, name: USDToken, variability?: USDPrim_Property_Variability, isCustom?: boolean): (USDPrim_Relationship_Spec) | null
Swift declaration
init?(owner: USDPrim.Spec, name: USDToken, variability: USDPrim.Property.Variability = .varying, isCustom: Bool = true)

Creates a new relationship spec under the given prim spec. - Parameters: - owner: The prim spec that owns the new relationship. - name: The relationship's name. - variability: The relationship's variability. - isCustom: Whether the relationship is authored as `custom`.

get · iOS 27.0+

owner

TypeScript
get owner(): (USDLayer_Spec) | null
Swift declaration
var owner: USDLayer.Spec? { get }

The spec that contains this relationship.

method · iOS 27.0+

rename

TypeScript
rename(name: USDToken): void
Swift declaration
func rename(to name: USDToken) throws

Sets the relationship's name. - Parameter name: The new name to assign. - Throws: An error if the new name is invalid or already used by a sibling.

get · iOS 27.0+

comment

TypeScript
get comment(): (string) | null
Swift declaration
var comment: String? { get nonmutating set }

The authored user comment, or `nil` if not authored.

set · iOS 27.0+

comment

TypeScript
set comment(value: (string) | null)
Swift declaration
var comment: String? { get nonmutating set }

The authored user comment, or `nil` if not authored.

get · iOS 27.0+

isCustom

TypeScript
get isCustom(): boolean
Swift declaration
var isCustom: Bool { get nonmutating set }

Whether this relationship was authored as `custom`.

set · iOS 27.0+

isCustom

TypeScript
set isCustom(value: boolean)
Swift declaration
var isCustom: Bool { get nonmutating set }

Whether this relationship was authored as `custom`.

init · iOS 27.0+

init

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

Creates an empty (invalid) relationship spec handle.

init · iOS 27.0+

init

TypeScript
static init24430(spec: USDLayer_Spec): (USDPrim_Relationship_Spec) | null
Swift declaration
init?(_ spec: USDLayer.Spec)

Narrows an untyped ``USDLayer/Spec`` to a relationship spec. - Parameter spec: The spec to narrow. - Returns: A relationship spec, or `nil` if `spec` is not a relationship spec.

Skipped declarations

No declarations were skipped in this snapshot.

All USDKit types →