This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
attributeSpec.h File Reference
+ Include dependency graph for attributeSpec.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SdfAttributeSpec
 A subclass of SdfPropertySpec that holds typed data. More...
 

Functions

SDF_API SdfAttributeSpecHandle SdfCreatePrimAttributeInLayer (const SdfLayerHandle &layer, const SdfPath &attrPath, const SdfValueTypeName &typeName, SdfVariability variability=SdfVariabilityVarying, bool isCustom=false)
 Convenience function to create an attributeSpec on a primSpec at the given path, and any necessary parent primSpecs, in the given layer.
 
SDF_API bool SdfJustCreatePrimAttributeInLayer (const SdfLayerHandle &layer, const SdfPath &attrPath, const SdfValueTypeName &typeName, SdfVariability variability=SdfVariabilityVarying, bool isCustom=false)
 Convenience function to create an attributeSpec on a primSpec at the given path, and any necessary parent primSpecs, in the given layer.
 

Function Documentation

◆ SdfCreatePrimAttributeInLayer()

SDF_API SdfAttributeSpecHandle SdfCreatePrimAttributeInLayer ( const SdfLayerHandle &  layer,
const SdfPath attrPath,
const SdfValueTypeName typeName,
SdfVariability  variability = SdfVariabilityVarying,
bool  isCustom = false 
)

Convenience function to create an attributeSpec on a primSpec at the given path, and any necessary parent primSpecs, in the given layer.

If an attributeSpec already exists at the given path, author typeName, variability, and custom according to passed arguments and return an attribute spec handle.

Any newly created prim specs have SdfSpecifierOver and an empty type (as if created by SdfJustCreatePrimInLayer()). attrPath must be a valid prim property path (see SdfPath::IsPrimPropertyPath()). Return false and issue an error if we fail to author the required scene description.

◆ SdfJustCreatePrimAttributeInLayer()

SDF_API bool SdfJustCreatePrimAttributeInLayer ( const SdfLayerHandle &  layer,
const SdfPath attrPath,
const SdfValueTypeName typeName,
SdfVariability  variability = SdfVariabilityVarying,
bool  isCustom = false 
)

Convenience function to create an attributeSpec on a primSpec at the given path, and any necessary parent primSpecs, in the given layer.

If an attributeSpec already exists at the given path, just author typeName, variability, and custom according to passed arguments and return true.

Any newly created prim specs have SdfSpecifierOver and an empty type (as if created by SdfJustCreatePrimInLayer()). attrPath must be a valid prim property path (see SdfPath::IsPrimPropertyPath()). Return false and issue an error if we fail to author the required scene description.

Differs only from SdfCreatePrimAttributeInLayer only in that a bool, not a handle, is returned.