Contents

makeAttribute(named:as:custom:variability:)

Creates an attribute with the given name on this prim, or returns the existing attribute if one already exists.

Declaration

@discardableResult func makeAttribute(named name: USDToken, as type: USDPrim.Attribute.ValueType, custom: Bool = true, variability: USDPrim.Property.Variability = .varying) -> USDPrim.Attribute

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.

Return Value

The attribute with the given name.

See Also

Accessing attributes