attributes
TypeScriptget attributes(): Array<USDPrim_Attribute>Swift declarationvar attributes: [USDPrim.Attribute] { get }The attributes of this prim, including those provided by its schemas.
struct · iOS 27.0+ · SDK 27.1
struct USDPrimget attributes(): Array<USDPrim_Attribute>Swift declarationvar attributes: [USDPrim.Attribute] { get }The attributes of this prim, including those provided by its schemas.
get properties(): Array<USDPrim_Property>Swift declarationvar properties: [USDPrim.Property] { get }The properties of this prim, including those provided by its schemas.
get references(): USDPrim_ReferenceCollectionSwift declarationvar references: USDPrim.ReferenceCollection { get }The reference composition arcs on this prim.
get allChildren(): Array<USDPrim>Swift declarationvar allChildren: [USDPrim] { get }The child prims of this prim.
descendantsWhere(predicate: USDPrim_Predicate): Array<USDPrim>Swift declarationfunc descendants(where predicate: USDPrim.Predicate) -> [USDPrim]Returns the descendant prims of this prim that satisfy the given predicate.
get descendants(): Array<USDPrim>Swift declarationvar descendants: [USDPrim] { get }The active, loaded, defined, non-abstract descendant prims of this prim, in depth-first order.
get description(): stringSwift declarationvar description: String { get }A summary description of this prim. This property is safe to access on an invalid or expired prim.
hasProperty(name: USDToken): booleanSwift declarationfunc hasProperty(named name: USDToken) -> BoolReturns true if an attribute or relationship with a given name exists.
get isPrototype(): booleanSwift declarationvar isPrototype: Bool { get }A Boolean value indicating whether this prim is a prototype that instances share.
nextSiblingWhere(predicate: USDPrim_Predicate): USDPrimSwift declarationfunc nextSibling(where predicate: USDPrim.Predicate) -> USDPrimThe successor of this prim in its parent's list of children that satisfies the given predicate.
get nextSibling(): (USDPrim) | nullSwift declarationvar nextSibling: USDPrim? { get }The active, loaded, defined, non-abstract successor of this prim in its parent's list of children.
get specializes(): USDPrim_SpecializeCollectionSwift declarationvar specializes: USDPrim.SpecializeCollection { get }The specializes composition arcs on this prim.
get variantSets(): USDPrim_VariantSetCollectionSwift declarationvar variantSets: USDPrim.VariantSetCollection { get }The variant sets on this prim.
hasAPISchema(schemaIdentifier: USDToken): booleanSwift declarationfunc hasAPISchema(_ schemaIdentifier: USDToken) -> BoolReturns `true` if this prim has a particular API schema applied.
hasAttribute(name: USDToken): booleanSwift declarationfunc hasAttribute(named name: USDToken) -> BoolReturns true if an attribute with a given name exists on this prim.
relationshipAt(path: USDLayer_Path): USDPrim_RelationshipSwift declarationfunc relationship(at path: USDLayer.Path) -> USDPrim.RelationshipReturns 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.
relationshipNamed(name: USDToken): USDPrim_RelationshipSwift declarationfunc relationship(named name: USDToken) -> USDPrim.RelationshipReturns the relationship with a given name on this prim. If no relationship named `name` exists on this prim, returns an invalid relationship handle.
makeAttribute(name: USDToken, type: USDPrim_Attribute_ValueType, custom?: boolean, variability?: USDPrim_Property_Variability): USDPrim_AttributeSwift declaration@discardableResult func makeAttribute(named name: USDToken, as type: USDPrim.Attribute.ValueType, custom: Bool = true, variability: USDPrim.Property.Variability = .varying) -> USDPrim.AttributeCreates 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 propertyNames(): Array<USDToken>Swift declarationvar propertyNames: [USDToken] { get }The names of this prim's properties, including those provided by its schemas.
get allDescendants(): Array<USDPrim>Swift declarationvar allDescendants: [USDPrim] { get }The descendant prims of this prim.
applyAPISchemaInstanceName(schemaIdentifier: USDToken, instanceName: USDToken): voidSwift declarationfunc applyAPISchema(_ schemaIdentifier: USDToken, instanceName: USDToken) throwsApplies 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.
applyAPISchema(schemaIdentifier: USDToken): voidSwift declarationfunc applyAPISchema(_ schemaIdentifier: USDToken) throwsApplies 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.
hasRelationship(name: USDToken): booleanSwift declarationfunc hasRelationship(named name: USDToken) -> BoolReturns true if a relationship with a given name exists on this prim.
removeAPISchemaInstanceName(schemaIdentifier: USDToken, instanceName: USDToken): voidSwift declarationfunc removeAPISchema(_ schemaIdentifier: USDToken, instanceName: USDToken) throwsRemoves 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.
removeAPISchema(schemaIdentifier: USDToken): voidSwift declarationfunc removeAPISchema(_ schemaIdentifier: USDToken) throwsRemoves 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.
makeRelationship(name: USDToken, custom?: boolean): USDPrim_RelationshipSwift declaration@discardableResult func makeRelationship(named name: USDToken, custom: Bool = true) -> USDPrim.RelationshipCreates 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 authoredAttributes(): Array<USDPrim_Attribute>Swift declarationvar authoredAttributes: [USDPrim.Attribute] { get }The attributes of this prim that have an authored opinion.
get authoredProperties(): Array<USDPrim_Property>Swift declarationvar authoredProperties: [USDPrim.Property] { get }The properties of this prim that have an authored opinion.
get hasAuthoredInherits(): booleanSwift declarationvar hasAuthoredInherits: Bool { get }A Boolean value indicating whether the prim has authored inherit arcs.
get hasAuthoredPayloads(): booleanSwift declarationvar hasAuthoredPayloads: Bool { get }A Boolean value indicating whether the prim has authored payload arcs.
get transformOperations(): Array<USDTransformOperation>Swift declarationvar 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.
addTransformOperation(type: USDTransformOperation_Kind): voidSwift declarationfunc 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 authoredPropertyNames(): Array<USDToken>Swift declarationvar authoredPropertyNames: [USDToken] { get }The names of this prim's properties that have an authored opinion.
get hasAuthoredReferences(): booleanSwift declarationvar hasAuthoredReferences: Bool { get }A Boolean value indicating whether the prim has authored reference arcs.
get hasAuthoredSpecializes(): booleanSwift declarationvar hasAuthoredSpecializes: Bool { get }A Boolean value indicating whether the prim has authored specializes arcs.
clearTransformOperations(): voidSwift declarationfunc clearTransformOperations()Removes all transform operations from the prim's transform stack.
get path(): USDLayer_PathSwift declarationvar path: USDLayer.Path { get }The complete scene path to this prim, relative to its stage.
prim(path: USDLayer_Path): USDPrimSwift declarationfunc prim(at path: USDLayer.Path) -> USDPrimReturns 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 stage(): USDStageSwift declarationvar 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.
object(path: USDLayer_Path): USDStage_ObjectSwift declarationfunc object(at path: USDLayer.Path) -> USDStage.ObjectReturns 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 parent(): (USDPrim) | nullSwift declarationvar parent: USDPrim? { get }The immediate parent prim of this prim.
get isValid(): booleanSwift declarationvar 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.
childrenWhere(predicate: USDPrim_Predicate): Array<USDPrim>Swift declarationfunc children(where predicate: USDPrim.Predicate) -> [USDPrim]Returns the child prims of this prim that satisfy the given predicate.
get children(): Array<USDPrim>Swift declarationvar children: [USDPrim] { get }The active, loaded, defined, non-abstract child prims of this prim.
get inherits(): USDPrim_InheritCollectionSwift declarationvar inherits: USDPrim.InheritCollection { get }The inherit composition arcs on this prim.
isSchema(schemaIdentifier: USDToken): booleanSwift declarationfunc isSchema(_ schemaIdentifier: USDToken) -> BoolReturns `true` if this prim has the given type or a more derived type.
get payloads(): USDPrim_PayloadCollectionSwift declarationvar payloads: USDPrim.PayloadCollection { get }The payload composition arcs on this prim.
get primPath(): USDLayer_PathSwift declarationvar primPath: USDLayer.Path { get }The complete scene path to this prim, relative to its stage. This property is equivalent to ``path``.
propertyAt(path: USDLayer_Path): USDPrim_PropertySwift declarationfunc property(at path: USDLayer.Path) -> USDPrim.PropertyReturns 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.
propertyNamed(name: USDToken): USDPrim_PropertySwift declarationfunc property(named name: USDToken) -> USDPrim.PropertyReturns the property with a given name on this prim. If no property named `name` exists on this prim, returns an invalid property handle.
attributeAt(path: USDLayer_Path): USDPrim_AttributeSwift declarationfunc attribute(at path: USDLayer.Path) -> USDPrim.AttributeReturns 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.
attributeNamed(name: USDToken): USDPrim_AttributeSwift declarationfunc attribute(named name: USDToken) -> USDPrim.AttributeReturns the attribute with a given name on this prim. If no attribute named `name` exists on this prim, returns an invalid attribute handle.
get prototype(): USDPrimSwift declarationvar prototype: USDPrim { get }The prototype that this instance shares, or an invalid prim if this prim is not an instance.
get specifier(): USDPrim_SpecifierSwift declarationvar specifier: USDPrim.Specifier { get }The specifier that describes how this prim is defined, such as `def`, `over`, or `class`.
transform(time?: USDStage_TimeCode): (USDValue_Matrix4d) | nullSwift declarationfunc 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.
static init(): USDPrimSwift declarationinit()An invalid prim handle.
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) | nullSwift declarationsubscript<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.
static init62301(object: USDStage_Object): (USDPrim) | nullSwift declarationinit?(_ object: USDStage.Object)Casts an object handle to a prim handle. Returns `nil` if the object is not a prim.
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.