colorSpace
TypeScriptget colorSpace(): (USDToken) | nullSwift declarationvar colorSpace: USDToken? { get nonmutating set }The authored color space, or `nil` if not authored. Assigning `nil` clears the color space.
struct · iOS 27.0+ · SDK 27.1
struct SpecA 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.
get colorSpace(): (USDToken) | nullSwift declarationvar colorSpace: USDToken? { get nonmutating set }The authored color space, or `nil` if not authored. Assigning `nil` clears the color space.
set colorSpace(value: (USDToken) | null)Swift declarationvar colorSpace: USDToken? { get nonmutating set }The authored color space, or `nil` if not authored. Assigning `nil` clears the color space.
get customData(): Record<string, USDValue>Swift declarationvar customData: Dictionary<String, USDValue> { get }The custom data dictionary authored on this attribute.
get permission(): USDLayer_PermissionSwift declarationvar permission: USDLayer.Permission { get nonmutating set }The attribute's permission level (public, restricted, private).
set permission(value: USDLayer_Permission)Swift declarationvar permission: USDLayer.Permission { get nonmutating set }The attribute's permission level (public, restricted, private).
setAssetInfo(key: string, value: USDValue): voidSwift declarationfunc 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 documentation(): (string) | nullSwift declarationvar documentation: String? { get nonmutating set }The authored documentation, or `nil` if not authored.
set documentation(value: (string) | null)Swift declarationvar documentation: String? { get nonmutating set }The authored documentation, or `nil` if not authored.
setCustomData(key: string, value: USDValue): voidSwift declarationfunc setCustomData(_ key: String, to value: USDValue)Sets `key` in the custom data dictionary to `value`. - Parameters: - key: The dictionary key. - value: The new value.
clearAssetInfo(key: string): voidSwift declarationfunc clearAssetInfo(_ key: String)Removes `key` from the asset info dictionary. - Parameter key: The dictionary key to clear.
clearCustomData(key: string): voidSwift declarationfunc clearCustomData(_ key: String)Removes `key` from the custom data dictionary. - Parameter key: The dictionary key to clear.
get connectionPaths(): (Array<USDLayer_Path>) | nullSwift declarationvar connectionPaths: [USDLayer.Path]? { get }The authored connection paths, or `nil` if none authored.
clearConnectionPaths(): voidSwift declarationfunc clearConnectionPaths()Clears all authored connection paths on this attribute.
get name(): USDTokenSwift declarationvar name: USDToken { get }The attribute's local name.
static initLayerAttributePathTypeNameVariabilityIsCustom(layer: USDLayer, attributePath: USDLayer_Path, typeName: USDPrim_Attribute_ValueType, variability?: USDPrim_Property_Variability, isCustom?: boolean): (USDPrim_Attribute_Spec) | nullSwift declarationinit?(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`.
static initOwnerNameTypeNameVariabilityIsCustom(owner: USDPrim_Spec, name: USDToken, typeName: USDPrim_Attribute_ValueType, variability?: USDPrim_Property_Variability, isCustom?: boolean): (USDPrim_Attribute_Spec) | nullSwift declarationinit?(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 owner(): (USDLayer_Spec) | nullSwift declarationvar owner: USDLayer.Spec? { get }The spec that contains this attribute.
rename(name: USDToken): voidSwift declarationfunc rename(to name: USDToken) throwsSets 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 comment(): (string) | nullSwift declarationvar comment: String? { get nonmutating set }The authored user comment, or `nil` if not authored.
set comment(value: (string) | null)Swift declarationvar comment: String? { get nonmutating set }The authored user comment, or `nil` if not authored.
get isCustom(): booleanSwift declarationvar isCustom: Bool { get nonmutating set }Whether this attribute was authored as `custom`.
set isCustom(value: boolean)Swift declarationvar isCustom: Bool { get nonmutating set }Whether this attribute was authored as `custom`.
static init(): USDPrim_Attribute_SpecSwift declarationinit()Creates an empty (invalid) attribute spec handle.
static init27266(spec: USDLayer_Spec): (USDPrim_Attribute_Spec) | nullSwift declarationinit?(_ 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.
No declarations were skipped in this snapshot.