One Logo Pool Ball
USDKit · IOS API REFERENCE

USDPrim.Spec

struct · iOS 27.0+ · SDK 27.1

struct Spec

A handle to a prim definition stored in a layer. `USDPrim.Spec` is a struct but acts as a handle into data owned by a ``USDLayer``, much like ``USDPrim`` is a handle into a ``USDStage``. Mutations write through to the layer rather than to the spec value itself, so property setters and methods on this type are non-mutating.

Members (87)

init · iOS 27.0+

init

TypeScript
static initParentPrimSpecNameSpecifierTypeName(parentPrimSpec: USDPrim_Spec, name: USDToken, specifier: USDPrim_Specifier, typeName?: string): (USDPrim_Spec) | null
Swift declaration
init?(parentPrimSpec: USDPrim.Spec, name: USDToken, specifier: USDPrim.Specifier, typeName: String = "")

Creates a new child prim spec under the given parent prim spec.

get · iOS 27.0+

attributes

TypeScript
get attributes(): Array<USDPrim_Attribute_Spec>
Swift declaration
var attributes: [USDPrim.Attribute.Spec] { get }

All attribute specs on this prim.

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 prim.

get · iOS 27.0+

permission

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

The prim'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 prim's permission level (public, restricted, private).

get · iOS 27.0+

properties

TypeScript
get properties(): Array<USDPrim_Property_Spec>
Swift declaration
var properties: [USDPrim.Property.Spec] { get nonmutating set }

All property specs (attributes and relationships) on this prim.

set · iOS 27.0+

properties

TypeScript
set properties(value: Array<USDPrim_Property_Spec>)
Swift declaration
var properties: [USDPrim.Property.Spec] { get nonmutating set }

All property specs (attributes and relationships) on this prim.

get · iOS 27.0+

pseudoRoot

TypeScript
get pseudoRoot(): (USDPrim_Spec) | null
Swift declaration
var pseudoRoot: USDPrim.Spec? { get }

The pseudo-root prim spec at `/` in this spec's layer.

get · iOS 27.0+

references

TypeScript
get references(): (Array<USDPrim_Reference>) | null
Swift declaration
var references: [USDPrim.Reference]? { get }

The authored references on this prim, or `nil` if none authored.

method · iOS 27.0+

appendChild

TypeScript
appendChild(child: USDPrim_Spec): void
Swift declaration
func appendChild(_ child: USDPrim.Spec)

Appends `child` to the end of the children list. - Parameter child: The child prim spec to append.

method · iOS 27.0+

insertChild

TypeScript
insertChild(child: USDPrim_Spec, index: number): void
Swift declaration
func insertChild(_ child: USDPrim.Spec, at index: Int)

Inserts `child` into the children list at `index`. - Parameters: - child: The child prim spec to insert. - index: The position at which to insert. Traps on out-of-range index.

static · iOS 27.0+

isValidName

TypeScript
static isValidName(name: USDToken): boolean
Swift declaration
static func isValidName(_ name: USDToken) -> Bool

Returns a Boolean value that indicates whether `name` is a valid prim name. - Parameter name: The candidate name. - Returns: `true` if `name` is a valid prim name; otherwise, `false`.

init · iOS 27.0+

init

TypeScript
static initParentLayerNameSpecifierTypeName(parentLayer: USDLayer, name: USDToken, specifier: USDPrim_Specifier, typeName?: string): (USDPrim_Spec) | null
Swift declaration
init?(parentLayer: USDLayer, name: USDToken, specifier: USDPrim.Specifier, typeName: String = "")

Creates a new top-level prim spec under the given layer.

method · iOS 27.0+

removeChild

TypeScript
removeChild(child: USDPrim_Spec): void
Swift declaration
func removeChild(_ child: USDPrim.Spec)

Removes `child` from the children list. No-op if `child` is not a child of this spec. - Parameter child: The child prim spec to remove.

get · iOS 27.0+

specializes

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

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

get · iOS 27.0+

variantSets

TypeScript
get variantSets(): NativeMap<USDToken, USDPrim_VariantSetSpec>
Swift declaration
var variantSets: [USDToken : USDPrim.VariantSetSpec] { get }

The variant sets authored on this prim, keyed by name.

method · iOS 27.0+

relationship

TypeScript
relationship(path: USDLayer_Path): (USDPrim_Relationship_Spec) | null
Swift declaration
func relationship(at path: USDLayer.Path) -> USDPrim.Relationship.Spec?

Returns the relationship spec at the given path within this prim. - Parameter path: The path to look up. - Returns: The relationship spec, or `nil` if none exists at `path`.

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`. - Parameters: - key: The dictionary key. - value: The new value.

method · iOS 27.0+

variantNames

TypeScript
variantNames(setName: USDToken): Array<USDToken>
Swift declaration
func variantNames(in setName: USDToken) -> [USDToken]

Returns the variant names available in the given variant set. - Parameter setName: The variant set name. - Returns: The variant names defined in `setName`.

get · iOS 27.0+

childrenOrder

TypeScript
get childrenOrder(): (Array<USDToken>) | null
Swift declaration
var childrenOrder: [USDToken]? { get nonmutating set }

The authored override for child ordering, or `nil` if no order is authored. When non-nil, this list controls the order in which child prim specs appear during composition.

set · iOS 27.0+

childrenOrder

TypeScript
set childrenOrder(value: (Array<USDToken>) | null)
Swift declaration
var childrenOrder: [USDToken]? { get nonmutating set }

The authored override for child ordering, or `nil` if no order is authored. When non-nil, this list controls the order in which child prim specs appear during composition.

method · iOS 27.0+

clearInherits

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

Clears all authored inherit paths on this prim.

method · iOS 27.0+

clearPayloads

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

Clears all authored payloads on this prim.

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.

get · iOS 27.0+

propertyOrder

TypeScript
get propertyOrder(): (Array<USDToken>) | null
Swift declaration
var propertyOrder: [USDToken]? { get nonmutating set }

The authored override for property ordering, or `nil` if no order is authored.

set · iOS 27.0+

propertyOrder

TypeScript
set propertyOrder(value: (Array<USDToken>) | null)
Swift declaration
var propertyOrder: [USDToken]? { get nonmutating set }

The authored override for property ordering, or `nil` if no order is authored.

get · iOS 27.0+

relationships

TypeScript
get relationships(): Array<USDPrim_Relationship_Spec>
Swift declaration
var relationships: [USDPrim.Relationship.Spec] { get }

All relationship specs on this prim.

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.

get · iOS 27.0+

symmetricPeer

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

The symmetric peer path, or `nil` if not authored.

set · iOS 27.0+

symmetricPeer

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

The symmetric peer path, or `nil` if not authored.

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+

clearRelocates

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

Clears all authored relocates on this prim.

get · iOS 27.0+

isInstanceable

TypeScript
get isInstanceable(): (boolean) | null
Swift declaration
var isInstanceable: Bool? { get nonmutating set }

Whether this prim is marked as an instance, or `nil` if not authored.

set · iOS 27.0+

isInstanceable

TypeScript
set isInstanceable(value: (boolean) | null)
Swift declaration
var isInstanceable: Bool? { get nonmutating set }

Whether this prim is marked as an instance, or `nil` if not authored.

method · iOS 27.0+

removeProperty

TypeScript
removeProperty(spec: USDPrim_Property_Spec): void
Swift declaration
func removeProperty(_ spec: USDPrim.Property.Spec)

Removes the given property spec from this prim. - Parameter spec: The property spec to remove.

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+

clearReferences

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

Clears all authored references on this prim.

get · iOS 27.0+

variantSetNames

TypeScript
get variantSetNames(): Array<USDToken>
Swift declaration
var variantSetNames: [USDToken] { get }

The names of variant sets defined on this prim.

method · iOS 27.0+

clearSpecializes

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

Clears all authored specializes paths on this prim.

method · iOS 27.0+

removeVariantSet

TypeScript
removeVariantSet(name: USDToken): void
Swift declaration
func removeVariantSet(_ name: USDToken)

Removes the variant set with the given name. - Parameter name: The variant set to remove.

get · iOS 27.0+

symmetryFunction

TypeScript
get symmetryFunction(): (USDToken) | null
Swift declaration
var symmetryFunction: USDToken? { get nonmutating set }

The symmetry function token, or `nil` if not authored.

set · iOS 27.0+

symmetryFunction

TypeScript
set symmetryFunction(value: (USDToken) | null)
Swift declaration
var symmetryFunction: USDToken? { get nonmutating set }

The symmetry function token, or `nil` if not authored.

method · iOS 27.0+

variantSelection

TypeScript
variantSelection(setName: USDToken): (USDToken) | null
Swift declaration
func variantSelection(for setName: USDToken) -> USDToken?

Returns the authored variant selection for the given variant set. - Parameter setName: The variant set to query. - Returns: The authored variant name, or `nil` if not authored.

get · iOS 27.0+

symmetryArguments

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

The symmetry arguments dictionary authored on this prim.

get · iOS 27.0+

variantSelections

TypeScript
get variantSelections(): NativeMap<USDToken, USDToken>
Swift declaration
var variantSelections: [USDToken : USDToken] { get }

All authored variant selections, keyed by variant set name.

get · iOS 27.0+

prefixSubstitutions

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

The prefix substitutions dictionary.

set · iOS 27.0+

prefixSubstitutions

TypeScript
set prefixSubstitutions(value: Record<string, USDValue>)
Swift declaration
var prefixSubstitutions: Dictionary<String, USDValue> { get nonmutating set }

The prefix substitutions dictionary.

method · iOS 27.0+

setSymmetryArgument

TypeScript
setSymmetryArgument(name: string, value: USDValue): void
Swift declaration
func setSymmetryArgument(_ name: String, to value: USDValue)

Sets `name` in the symmetry arguments dictionary to `value`. - Parameters: - name: The argument name. - value: The new value.

method · iOS 27.0+

setVariantSelection

TypeScript
setVariantSelection(setName: USDToken, variantName: USDToken): void
Swift declaration
func setVariantSelection(for setName: USDToken, to variantName: USDToken)

Sets the variant selection for the given variant set. - Parameters: - setName: The variant set to update. - variantName: The variant to select.

get · iOS 27.0+

suffixSubstitutions

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

The suffix substitutions dictionary.

set · iOS 27.0+

suffixSubstitutions

TypeScript
set suffixSubstitutions(value: Record<string, USDValue>)
Swift declaration
var suffixSubstitutions: Dictionary<String, USDValue> { get nonmutating set }

The suffix substitutions dictionary.

method · iOS 27.0+

blockVariantSelection

TypeScript
blockVariantSelection(setName: USDToken): void
Swift declaration
func blockVariantSelection(for setName: USDToken)

Authors an explicit "no selection" for the given variant set. - Parameter setName: The variant set to block.

method · iOS 27.0+

clearSymmetryArgument

TypeScript
clearSymmetryArgument(name: string): void
Swift declaration
func clearSymmetryArgument(_ name: String)

Removes `name` from the symmetry arguments dictionary. - Parameter name: The argument name to clear.

method · iOS 27.0+

clearVariantSelection

TypeScript
clearVariantSelection(setName: USDToken): void
Swift declaration
func clearVariantSelection(for setName: USDToken)

Clears the variant selection for the given variant set. - Parameter setName: The variant set to clear.

get · iOS 27.0+

kind

TypeScript
get kind(): (USDToken) | null
Swift declaration
var kind: USDToken? { get nonmutating set }

The prim's kind, or `nil` if not authored.

set · iOS 27.0+

kind

TypeScript
set kind(value: (USDToken) | null)
Swift declaration
var kind: USDToken? { get nonmutating set }

The prim's kind, or `nil` if not authored.

get · iOS 27.0+

name

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

The prim's local name.

method · iOS 27.0+

prim

TypeScript
prim(path: USDLayer_Path): (USDPrim_Spec) | null
Swift declaration
func prim(at path: USDLayer.Path) -> USDPrim.Spec?

Returns the prim spec at the given path within this prim. - Parameter path: The path to look up. - Returns: The prim spec, or `nil` if none exists at `path`.

method · iOS 27.0+

spec

TypeScript
spec(path: USDLayer_Path): (USDLayer_Spec) | null
Swift declaration
func spec(at path: USDLayer.Path) -> USDLayer.Spec?

Returns the spec at the given path within this prim. - Parameter path: The path to look up. - Returns: The spec, or `nil` if no spec is authored at `path`.

init · iOS 27.0+

init

TypeScript
static initLayerPrimPath(layer: USDLayer, primPath: USDLayer_Path): (USDPrim_Spec) | null
Swift declaration
init?(layer: USDLayer, primPath: USDLayer.Path)

Creates a prim spec at the given path in the layer, authoring intermediate ancestor prim specs as `over`s where needed.

get · iOS 27.0+

parent

TypeScript
get parent(): (USDPrim_Spec) | null
Swift declaration
var parent: USDPrim.Spec? { get }

The parent prim spec, or `nil` if this is a top-level prim spec.

get · iOS 27.0+

prefix

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

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

set · iOS 27.0+

prefix

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

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

method · iOS 27.0+

rename

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

Sets the prim'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+

suffix

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

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

set · iOS 27.0+

suffix

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

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

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+

children

TypeScript
get children(): Array<USDPrim_Spec>
Swift declaration
var children: [USDPrim.Spec] { get nonmutating set }

The child prim specs in authoring order.

set · iOS 27.0+

children

TypeScript
set children(value: Array<USDPrim_Spec>)
Swift declaration
var children: [USDPrim.Spec] { get nonmutating set }

The child prim specs in authoring order.

get · iOS 27.0+

inherits

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

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

get · iOS 27.0+

isActive

TypeScript
get isActive(): (boolean) | null
Swift declaration
var isActive: Bool? { get nonmutating set }

Whether this prim is active in composition, or `nil` if not authored.

set · iOS 27.0+

isActive

TypeScript
set isActive(value: (boolean) | null)
Swift declaration
var isActive: Bool? { get nonmutating set }

Whether this prim is active in composition, or `nil` if not authored.

get · iOS 27.0+

payloads

TypeScript
get payloads(): (Array<USDPrim_Payload>) | null
Swift declaration
var payloads: [USDPrim.Payload]? { get }

The authored payloads on this prim, or `nil` if none authored.

method · iOS 27.0+

property

TypeScript
property(path: USDLayer_Path): (USDPrim_Property_Spec) | null
Swift declaration
func property(at path: USDLayer.Path) -> USDPrim.Property.Spec?

Returns the property spec at the given path within this prim. - Parameter path: The path to look up. - Returns: The property spec, or `nil` if none exists at `path`.

get · iOS 27.0+

typeName

TypeScript
get typeName(): USDToken
Swift declaration
var typeName: USDToken { get nonmutating set }

The prim's type name.

set · iOS 27.0+

typeName

TypeScript
set typeName(value: USDToken)
Swift declaration
var typeName: USDToken { get nonmutating set }

The prim's type name.

get · iOS 27.0+

assetInfo

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

The asset info dictionary authored on this prim.

method · iOS 27.0+

attribute

TypeScript
attribute(path: USDLayer_Path): (USDPrim_Attribute_Spec) | null
Swift declaration
func attribute(at path: USDLayer.Path) -> USDPrim.Attribute.Spec?

Returns the attribute spec at the given path within this prim. - Parameter path: The path to look up. - Returns: The attribute spec, or `nil` if none exists at `path`.

get · iOS 27.0+

relocates

TypeScript
get relocates(): (NativeMap<USDLayer_Path, USDLayer_Path>) | null
Swift declaration
var relocates: USDLayer.RelocatesMap? { get nonmutating set }

The relocates map authored on this prim, or `nil` if none authored.

set · iOS 27.0+

relocates

TypeScript
set relocates(value: (NativeMap<USDLayer_Path, USDLayer_Path>) | null)
Swift declaration
var relocates: USDLayer.RelocatesMap? { get nonmutating set }

The relocates map authored on this prim, or `nil` if none authored.

get · iOS 27.0+

specifier

TypeScript
get specifier(): USDPrim_Specifier
Swift declaration
var specifier: USDPrim.Specifier { get nonmutating set }

How this prim definition composes — `def`, `over`, or `class`.

set · iOS 27.0+

specifier

TypeScript
set specifier(value: USDPrim_Specifier)
Swift declaration
var specifier: USDPrim.Specifier { get nonmutating set }

How this prim definition composes — `def`, `over`, or `class`.

init · iOS 27.0+

init

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

Creates an empty (invalid) prim spec handle.

init · iOS 27.0+

init

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

Narrows an untyped ``USDLayer/Spec`` to a `USDPrim.Spec`. Returns `nil` if `spec` is not a prim spec.

init · iOS 27.0+

init

TypeScript
static init27140(pseudoRoot: USDPrim_PseudoRootSpec): USDPrim_Spec
Swift declaration
init(_ pseudoRoot: USDPrim.PseudoRootSpec)

Widens a `USDPrim.PseudoRootSpec` into a generic `USDPrim.Spec`, exposing the full prim-spec API (children, properties, metadata). - Parameter pseudoRoot: The pseudo-root spec to widen.

Skipped declarations

No declarations were skipped in this snapshot.

All USDKit types →