One Logo Pool Ball
USDKit · IOS API REFERENCE

USDPrim.Attribute.Spec

struct · iOS 27.0+ · SDK 27.1

struct Spec

A handle to an attribute definition stored in a layer. `USDPrim.Attribute.Spec` is a struct but acts as a handle into data owned by a ``USDLayer``. Mutations write through to the layer.

Members (24)

get · iOS 27.0+

colorSpace

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

The authored color space, or `nil` if not authored. Assigning `nil` clears the color space.

set · iOS 27.0+

colorSpace

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

The authored color space, or `nil` if not authored. Assigning `nil` clears the color space.

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

get · iOS 27.0+

permission

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

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

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+

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.

get · iOS 27.0+

connectionPaths

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

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

method · iOS 27.0+

clearConnectionPaths

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

Clears all authored connection paths on this attribute.

get · iOS 27.0+

name

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

The attribute's local name.

init · iOS 27.0+

init

TypeScript
static initLayerAttributePathTypeNameVariabilityIsCustom(layer: USDLayer, attributePath: USDLayer_Path, typeName: USDPrim_Attribute_ValueType, variability?: USDPrim_Property_Variability, isCustom?: boolean): (USDPrim_Attribute_Spec) | null
Swift declaration
init?(layer: USDLayer, attributePath: USDLayer.Path, typeName: USDPrim.Attribute.ValueType, variability: USDPrim.Property.Variability = .varying, isCustom: Bool = false)

Creates an attribute 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 attribute. - attributePath: The full path of the attribute to author. - typeName: The attribute's value type. - variability: The attribute's variability. - isCustom: Whether the attribute is authored as `custom`.

init · iOS 27.0+

init

TypeScript
static initOwnerNameTypeNameVariabilityIsCustom(owner: USDPrim_Spec, name: USDToken, typeName: USDPrim_Attribute_ValueType, variability?: USDPrim_Property_Variability, isCustom?: boolean): (USDPrim_Attribute_Spec) | null
Swift declaration
init?(owner: USDPrim.Spec, name: USDToken, typeName: USDPrim.Attribute.ValueType, variability: USDPrim.Property.Variability = .varying, isCustom: Bool = false)

Creates a new attribute spec under the given prim spec. - Parameters: - owner: The prim spec that owns the new attribute. - name: The attribute's name. - typeName: The attribute's value type. - variability: The attribute's variability. - isCustom: Whether the attribute 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 attribute.

method · iOS 27.0+

rename

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

Sets the attribute'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 attribute was authored as `custom`.

set · iOS 27.0+

isCustom

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

Whether this attribute was authored as `custom`.

init · iOS 27.0+

init

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

Creates an empty (invalid) attribute spec handle.

init · iOS 27.0+

init

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

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

Skipped declarations

No declarations were skipped in this snapshot.

All USDKit types →