One Logo Pool Ball
USDKit · IOS API REFERENCE

USDPrim.VariantSpec

struct · iOS 27.0+ · SDK 27.1

struct VariantSpec

A handle to a single variant option within a variant set.

Members (8)

get · iOS 27.0+

primSpec

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

The prim spec this variant authors when selected.

get · iOS 27.0+

variantSets

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

Variant sets defined inside this variant (nested variation).

method · iOS 27.0+

variantNames

TypeScript
variantNames(variantSetName: USDToken): Array<USDToken>
Swift declaration
func variantNames(_ variantSetName: USDToken) -> [USDToken]

Returns the variant names available in a nested variant set on this variant. - Parameter variantSetName: The nested variant set name. - Returns: The variant names defined in `variantSetName`.

get · iOS 27.0+

name

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

The variant's local name.

init · iOS 27.0+

init

TypeScript
static initOwnerName(owner: USDPrim_VariantSetSpec, name: USDToken): (USDPrim_VariantSpec) | null
Swift declaration
init?(owner: USDPrim.VariantSetSpec, name: USDToken)

Creates a new variant spec under the given variant set spec. - Parameters: - owner: The variant set that owns the new variant. - name: The variant's name.

get · iOS 27.0+

owner

TypeScript
get owner(): (USDPrim_VariantSetSpec) | null
Swift declaration
var owner: USDPrim.VariantSetSpec? { get }

The owning variant set spec.

init · iOS 27.0+

init

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

Creates an empty (invalid) variant spec handle.

init · iOS 27.0+

init

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

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

Skipped declarations

No declarations were skipped in this snapshot.

All USDKit types →