One Logo Pool Ball
USDKit · IOS API REFERENCE

USDPrim

struct · iOS 27.0+ · SDK 27.1

struct USDPrim

Members (58)

get · iOS 27.0+

attributes

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

The attributes of this prim, including those provided by its schemas.

get · iOS 27.0+

properties

TypeScript
get properties(): Array<USDPrim_Property>
Swift declaration
var properties: [USDPrim.Property] { get }

The properties of this prim, including those provided by its schemas.

get · iOS 27.0+

references

TypeScript
get references(): USDPrim_ReferenceCollection
Swift declaration
var references: USDPrim.ReferenceCollection { get }

The reference composition arcs on this prim.

get · iOS 27.0+

allChildren

TypeScript
get allChildren(): Array<USDPrim>
Swift declaration
var allChildren: [USDPrim] { get }

The child prims of this prim.

method · iOS 27.0+

descendants

TypeScript
descendantsWhere(predicate: USDPrim_Predicate): Array<USDPrim>
Swift declaration
func descendants(where predicate: USDPrim.Predicate) -> [USDPrim]

Returns the descendant prims of this prim that satisfy the given predicate.

get · iOS 27.0+

descendants

TypeScript
get descendants(): Array<USDPrim>
Swift declaration
var descendants: [USDPrim] { get }

The active, loaded, defined, non-abstract descendant prims of this prim, in depth-first order.

get · iOS 27.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A summary description of this prim. This property is safe to access on an invalid or expired prim.

method · iOS 27.0+

hasProperty

TypeScript
hasProperty(name: USDToken): boolean
Swift declaration
func hasProperty(named name: USDToken) -> Bool

Returns true if an attribute or relationship with a given name exists.

get · iOS 27.0+

isPrototype

TypeScript
get isPrototype(): boolean
Swift declaration
var isPrototype: Bool { get }

A Boolean value indicating whether this prim is a prototype that instances share.

method · iOS 27.0+

nextSibling

TypeScript
nextSiblingWhere(predicate: USDPrim_Predicate): USDPrim
Swift declaration
func nextSibling(where predicate: USDPrim.Predicate) -> USDPrim

The successor of this prim in its parent's list of children that satisfies the given predicate.

get · iOS 27.0+

nextSibling

TypeScript
get nextSibling(): (USDPrim) | null
Swift declaration
var nextSibling: USDPrim? { get }

The active, loaded, defined, non-abstract successor of this prim in its parent's list of children.

get · iOS 27.0+

specializes

TypeScript
get specializes(): USDPrim_SpecializeCollection
Swift declaration
var specializes: USDPrim.SpecializeCollection { get }

The specializes composition arcs on this prim.

get · iOS 27.0+

variantSets

TypeScript
get variantSets(): USDPrim_VariantSetCollection
Swift declaration
var variantSets: USDPrim.VariantSetCollection { get }

The variant sets on this prim.

method · iOS 27.0+

hasAPISchema

TypeScript
hasAPISchema(schemaIdentifier: USDToken): boolean
Swift declaration
func hasAPISchema(_ schemaIdentifier: USDToken) -> Bool

Returns `true` if this prim has a particular API schema applied.

method · iOS 27.0+

hasAttribute

TypeScript
hasAttribute(name: USDToken): boolean
Swift declaration
func hasAttribute(named name: USDToken) -> Bool

Returns true if an attribute with a given name exists on this prim.

method · iOS 27.0+

relationship

TypeScript
relationshipAt(path: USDLayer_Path): USDPrim_Relationship
Swift declaration
func relationship(at path: USDLayer.Path) -> USDPrim.Relationship

Returns the relationship at a given path, relative to this prim. If `path` is relative, it is anchored to this prim's path. If no relationship exists at the resolved path, returns an invalid relationship handle.

method · iOS 27.0+

relationship

TypeScript
relationshipNamed(name: USDToken): USDPrim_Relationship
Swift declaration
func relationship(named name: USDToken) -> USDPrim.Relationship

Returns the relationship with a given name on this prim. If no relationship named `name` exists on this prim, returns an invalid relationship handle.

method · iOS 27.0+

makeAttribute

TypeScript
makeAttribute(name: USDToken, type: USDPrim_Attribute_ValueType, custom?: boolean, variability?: USDPrim_Property_Variability): USDPrim_Attribute
Swift declaration
@discardableResult func makeAttribute(named name: USDToken, as type: USDPrim.Attribute.ValueType, custom: Bool = true, variability: USDPrim.Property.Variability = .varying) -> USDPrim.Attribute

Creates an attribute with the given name on this prim, or returns the existing attribute if one already exists. - Parameters: - name: The name of the attribute to create. - type: The value type of the attribute. - custom: A Boolean value that indicates whether the attribute is a custom attribute not defined by a schema. - variability: The variability of the attribute. - Returns: The attribute with the given name.

get · iOS 27.0+

propertyNames

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

The names of this prim's properties, including those provided by its schemas.

get · iOS 27.0+

allDescendants

TypeScript
get allDescendants(): Array<USDPrim>
Swift declaration
var allDescendants: [USDPrim] { get }

The descendant prims of this prim.

method · iOS 27.0+

applyAPISchema

TypeScript
applyAPISchemaInstanceName(schemaIdentifier: USDToken, instanceName: USDToken): void
Swift declaration
func applyAPISchema(_ schemaIdentifier: USDToken, instanceName: USDToken) throws

Applies a multi-apply API schema to this prim with the given instance name. - Parameters: - schemaIdentifier: The identifier of the API schema to apply. - instanceName: The name of the schema instance to apply. - Throws: An error if the schema cannot be applied.

method · iOS 27.0+

applyAPISchema

TypeScript
applyAPISchema(schemaIdentifier: USDToken): void
Swift declaration
func applyAPISchema(_ schemaIdentifier: USDToken) throws

Applies a single-apply API schema to this prim. - Parameter schemaIdentifier: The identifier of the API schema to apply. - Throws: An error if the schema cannot be applied.

method · iOS 27.0+

hasRelationship

TypeScript
hasRelationship(name: USDToken): boolean
Swift declaration
func hasRelationship(named name: USDToken) -> Bool

Returns true if a relationship with a given name exists on this prim.

method · iOS 27.0+

removeAPISchema

TypeScript
removeAPISchemaInstanceName(schemaIdentifier: USDToken, instanceName: USDToken): void
Swift declaration
func removeAPISchema(_ schemaIdentifier: USDToken, instanceName: USDToken) throws

Removes a multi-apply API schema from this prim with the given instance name. - Parameters: - schemaIdentifier: The identifier of the API schema to remove. - instanceName: The name of the schema instance to remove. - Throws: An error if the schema cannot be removed.

method · iOS 27.0+

removeAPISchema

TypeScript
removeAPISchema(schemaIdentifier: USDToken): void
Swift declaration
func removeAPISchema(_ schemaIdentifier: USDToken) throws

Removes a single-apply API schema from this prim. - Parameter schemaIdentifier: The identifier of the API schema to remove. - Throws: An error if the schema cannot be removed.

method · iOS 27.0+

makeRelationship

TypeScript
makeRelationship(name: USDToken, custom?: boolean): USDPrim_Relationship
Swift declaration
@discardableResult func makeRelationship(named name: USDToken, custom: Bool = true) -> USDPrim.Relationship

Creates a relationship with the given name on this prim, or returns the existing relationship if one already exists. - Parameters: - name: The name of the relationship to create. - custom: A Boolean value that indicates whether the relationship is a custom relationship not defined by a schema. - Returns: The relationship with the given name.

get · iOS 27.0+

authoredAttributes

TypeScript
get authoredAttributes(): Array<USDPrim_Attribute>
Swift declaration
var authoredAttributes: [USDPrim.Attribute] { get }

The attributes of this prim that have an authored opinion.

get · iOS 27.0+

authoredProperties

TypeScript
get authoredProperties(): Array<USDPrim_Property>
Swift declaration
var authoredProperties: [USDPrim.Property] { get }

The properties of this prim that have an authored opinion.

get · iOS 27.0+

hasAuthoredInherits

TypeScript
get hasAuthoredInherits(): boolean
Swift declaration
var hasAuthoredInherits: Bool { get }

A Boolean value indicating whether the prim has authored inherit arcs.

get · iOS 27.0+

hasAuthoredPayloads

TypeScript
get hasAuthoredPayloads(): boolean
Swift declaration
var hasAuthoredPayloads: Bool { get }

A Boolean value indicating whether the prim has authored payload arcs.

get · iOS 27.0+

transformOperations

TypeScript
get transformOperations(): Array<USDTransformOperation>
Swift declaration
var transformOperations: [USDTransformOperation] { get }

The transform operations on this prim, in evaluation order. Returns an empty array if no transform operations are authored on the prim or if the prim does not conform to the Xformable schema.

method · iOS 27.0+

addTransformOperation

TypeScript
addTransformOperation(type: USDTransformOperation_Kind): void
Swift declaration
func addTransformOperation(type: USDTransformOperation.Kind)

Adds a transform operation of the given kind to this prim's transform stack. Creates the corresponding `xformOp:*` attribute and appends its name to the prim's `xformOpOrder`.

get · iOS 27.0+

authoredPropertyNames

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

The names of this prim's properties that have an authored opinion.

get · iOS 27.0+

hasAuthoredReferences

TypeScript
get hasAuthoredReferences(): boolean
Swift declaration
var hasAuthoredReferences: Bool { get }

A Boolean value indicating whether the prim has authored reference arcs.

get · iOS 27.0+

hasAuthoredSpecializes

TypeScript
get hasAuthoredSpecializes(): boolean
Swift declaration
var hasAuthoredSpecializes: Bool { get }

A Boolean value indicating whether the prim has authored specializes arcs.

method · iOS 27.0+

clearTransformOperations

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

Removes all transform operations from the prim's transform stack.

get · iOS 27.0+

path

TypeScript
get path(): USDLayer_Path
Swift declaration
var path: USDLayer.Path { get }

The complete scene path to this prim, relative to its stage.

method · iOS 27.0+

prim

TypeScript
prim(path: USDLayer_Path): USDPrim
Swift declaration
func prim(at path: USDLayer.Path) -> USDPrim

Returns the prim at a given path, relative to this prim. If `path` is relative, it is anchored to this prim's path. If no prim exists at the resolved path, returns an invalid prim handle.

get · iOS 27.0+

stage

TypeScript
get stage(): USDStage
Swift declaration
var stage: USDStage { get }

The stage that owns this prim. A prim's state and validity is connected to its stage. A prim becomes invalid when the lifetime of its stage ends. It can also become invalid when the stage is modified.

method · iOS 27.0+

object

TypeScript
object(path: USDLayer_Path): USDStage_Object
Swift declaration
func object(at path: USDLayer.Path) -> USDStage.Object

Returns the object at a given path, relative to this prim. If `path` is relative, it is anchored to this prim's path. If no object exists at the resolved path, returns an invalid object handle.

get · iOS 27.0+

parent

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

The immediate parent prim of this prim.

get · iOS 27.0+

isValid

TypeScript
get isValid(): boolean
Swift declaration
var isValid: Bool { get }

A Boolean value indicating whether this prim is valid. A prim's validity is connected to a ``USDStage``. A prim becomes invalid when the lifetime of its stage ends. A prim will also expire if its stage no longer defines that prim. `isValid` is false if this prim has expired.

method · iOS 27.0+

children

TypeScript
childrenWhere(predicate: USDPrim_Predicate): Array<USDPrim>
Swift declaration
func children(where predicate: USDPrim.Predicate) -> [USDPrim]

Returns the child prims of this prim that satisfy the given predicate.

get · iOS 27.0+

children

TypeScript
get children(): Array<USDPrim>
Swift declaration
var children: [USDPrim] { get }

The active, loaded, defined, non-abstract child prims of this prim.

get · iOS 27.0+

inherits

TypeScript
get inherits(): USDPrim_InheritCollection
Swift declaration
var inherits: USDPrim.InheritCollection { get }

The inherit composition arcs on this prim.

method · iOS 27.0+

isSchema

TypeScript
isSchema(schemaIdentifier: USDToken): boolean
Swift declaration
func isSchema(_ schemaIdentifier: USDToken) -> Bool

Returns `true` if this prim has the given type or a more derived type.

get · iOS 27.0+

payloads

TypeScript
get payloads(): USDPrim_PayloadCollection
Swift declaration
var payloads: USDPrim.PayloadCollection { get }

The payload composition arcs on this prim.

get · iOS 27.0+

primPath

TypeScript
get primPath(): USDLayer_Path
Swift declaration
var primPath: USDLayer.Path { get }

The complete scene path to this prim, relative to its stage. This property is equivalent to ``path``.

method · iOS 27.0+

property

TypeScript
propertyAt(path: USDLayer_Path): USDPrim_Property
Swift declaration
func property(at path: USDLayer.Path) -> USDPrim.Property

Returns the property at a given path, relative to this prim. If `path` is relative, it is anchored to this prim's path. If no property exists at the resolved path, returns an invalid property handle.

method · iOS 27.0+

property

TypeScript
propertyNamed(name: USDToken): USDPrim_Property
Swift declaration
func property(named name: USDToken) -> USDPrim.Property

Returns the property with a given name on this prim. If no property named `name` exists on this prim, returns an invalid property handle.

method · iOS 27.0+

attribute

TypeScript
attributeAt(path: USDLayer_Path): USDPrim_Attribute
Swift declaration
func attribute(at path: USDLayer.Path) -> USDPrim.Attribute

Returns the attribute at a given path, relative to this prim. If `path` is relative, it is anchored to this prim's path. If no attribute exists at the resolved path, returns an invalid attribute handle.

method · iOS 27.0+

attribute

TypeScript
attributeNamed(name: USDToken): USDPrim_Attribute
Swift declaration
func attribute(named name: USDToken) -> USDPrim.Attribute

Returns the attribute with a given name on this prim. If no attribute named `name` exists on this prim, returns an invalid attribute handle.

get · iOS 27.0+

prototype

TypeScript
get prototype(): USDPrim
Swift declaration
var prototype: USDPrim { get }

The prototype that this instance shares, or an invalid prim if this prim is not an instance.

get · iOS 27.0+

specifier

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

The specifier that describes how this prim is defined, such as `def`, `over`, or `class`.

method · iOS 27.0+

transform

TypeScript
transform(time?: USDStage_TimeCode): (USDValue_Matrix4d) | null
Swift declaration
func transform(at time: USDStage.TimeCode = .default) -> USDValue.Matrix4d?

Computes the prim's composed local transform at the specified time. - Parameter time: The time at which to evaluate the transform. Defaults to `.default`. - Returns: The composed local transformation matrix, or `nil` if the prim is not transformable.

init · iOS 27.0+

init

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

An invalid prim handle.

subscript · iOS 27.0+

subscript

TypeScript
subscript(attributeName: USDToken, type: "Bool" | "Int" | "UInt" | "Double" | "Float" | "String" | "USDKit.USDLayer.AssetPath" | "USDKit.USDLayer.PathExpression" | "USDKit.USDLayer.TimeCode" | "USDKit.USDToken" | "USDKit.USDValue.Matrix2d" | "USDKit.USDValue.Matrix3d" | "USDKit.USDValue.Matrix4d" | "USDKit.USDValue.Quatd" | "USDKit.USDValue.Quatf" | "USDKit.USDValue.Quath" | "USDKit.USDValue.Vec2d" | "USDKit.USDValue.Vec2f" | "USDKit.USDValue.Vec2h" | "USDKit.USDValue.Vec2i" | "USDKit.USDValue.Vec3d" | "USDKit.USDValue.Vec3f" | "USDKit.USDValue.Vec3h" | "USDKit.USDValue.Vec3i" | "USDKit.USDValue.Vec4d" | "USDKit.USDValue.Vec4f" | "USDKit.USDValue.Vec4h" | "USDKit.USDValue.Vec4i"): (unknown) | null
Swift declaration
subscript<T>(attributeName: USDToken, as type: T.Type) -> T? where T : USDPrim.Attribute.Value { get nonmutating set }

Access or modify the value of a named attribute on this prim. If the attribute has time samples, this subscript operates at the ``USDStage/TimeCode/default`` time code.

init · iOS 27.0+

init

TypeScript
static init62301(object: USDStage_Object): (USDPrim) | null
Swift declaration
init?(_ object: USDStage.Object)

Casts an object handle to a prim handle. Returns `nil` if the object is not a prim.

Skipped declarations

4 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

USDPrim.subscript(_:as:)

Passing a Swift type itself is not supported.

USDPrim.subscript(_:as:)

Passing a Swift type itself is not supported.

USDPrim.subscript(_:as:)

Passing a Swift type itself is not supported.

USDPrim.subscript(_:as:)

Passing a Swift type itself is not supported.

All USDKit types →