HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
types.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/sdf/api.h"
#include "pxr/usd/sdf/assetPath.h"
#include "pxr/usd/sdf/declareHandles.h"
#include "pxr/usd/sdf/listOp.h"
#include "pxr/usd/sdf/opaqueValue.h"
#include "pxr/usd/sdf/timeCode.h"
#include "pxr/usd/sdf/valueTypeName.h"
#include "pxr/base/arch/demangle.h"
#include "pxr/base/arch/inttypes.h"
#include "pxr/base/gf/half.h"
#include "pxr/base/gf/matrix2d.h"
#include "pxr/base/gf/matrix3d.h"
#include "pxr/base/gf/matrix4d.h"
#include "pxr/base/gf/quatd.h"
#include "pxr/base/gf/quatf.h"
#include "pxr/base/gf/quath.h"
#include "pxr/base/gf/vec2d.h"
#include "pxr/base/gf/vec2f.h"
#include "pxr/base/gf/vec2h.h"
#include "pxr/base/gf/vec2i.h"
#include "pxr/base/gf/vec3d.h"
#include "pxr/base/gf/vec3f.h"
#include "pxr/base/gf/vec3h.h"
#include "pxr/base/gf/vec3i.h"
#include "pxr/base/gf/vec4d.h"
#include "pxr/base/gf/vec4f.h"
#include "pxr/base/gf/vec4h.h"
#include "pxr/base/gf/vec4i.h"
#include "pxr/base/tf/enum.h"
#include "pxr/base/tf/preprocessorUtils.h"
#include "pxr/base/tf/staticTokens.h"
#include "pxr/base/tf/token.h"
#include "pxr/base/tf/type.h"
#include "pxr/base/vt/array.h"
#include "pxr/base/vt/dictionary.h"
#include "pxr/base/vt/value.h"
#include <hboost/preprocessor/list/for_each.hpp>
#include <hboost/preprocessor/list/size.hpp>
#include <hboost/preprocessor/punctuation/comma.hpp>
#include <hboost/preprocessor/selection/max.hpp>
#include <hboost/preprocessor/seq/for_each.hpp>
#include <hboost/preprocessor/seq/seq.hpp>
#include <hboost/preprocessor/tuple/elem.hpp>
#include <iosfwd>
#include <list>
#include <map>
#include <stdint.h>
#include <string>
#include <typeinfo>
#include <vector>
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SdfValueTypeTraits< T >
 
struct  SdfValueTypeTraits< char[N]>
 
class  SdfUnregisteredValue
 
class  Sdf_ValueTypeNamesType
 
struct  Sdf_ValueTypeNamesType::_Init
 
class  SdfValueBlock
 
struct  SdfHumanReadableValue
 

Macros

#define _SDF_LENGTH_UNITS
 
#define _SDF_ANGULAR_UNITS
 
#define _SDF_DIMENSIONLESS_UNITS
 
#define _SDF_UNITS
 
#define _SDF_UNIT_TAG(tup)   HBOOST_PP_TUPLE_ELEM(3, 0, tup)
 
#define _SDF_UNIT_NAME(tup)   HBOOST_PP_TUPLE_ELEM(3, 1, tup)
 
#define _SDF_UNIT_SCALE(tup)   HBOOST_PP_TUPLE_ELEM(3, 2, tup)
 
#define _SDF_UNITSLIST_CATEGORY(tup)   HBOOST_PP_TUPLE_ELEM(2, 0, tup)
 
#define _SDF_UNITSLIST_TUPLES(tup)   HBOOST_PP_TUPLE_ELEM(2, 1, tup)
 
#define _SDF_UNITSLIST_ENUM(elem)
 
#define _SDF_DECLARE_UNIT_ENUMERANT(r, tag, elem)   HBOOST_PP_CAT(Sdf ## tag ## Unit, _SDF_UNIT_TAG(elem)),
 
#define _SDF_DECLARE_UNIT_ENUM(r, unused, elem)
 
#define _SDF_MAX_UNITS_OP(d, state, list)   HBOOST_PP_MAX_D(d, state, HBOOST_PP_SEQ_SIZE(_SDF_UNITSLIST_TUPLES(list)))
 
#define _SDF_UNIT_MAX_UNITS   HBOOST_PP_LIST_FOLD_LEFT(_SDF_MAX_UNITS_OP, 0, _SDF_UNITS)
 
#define _SDF_UNIT_NUM_TYPES   HBOOST_PP_LIST_SIZE(_SDF_UNITS)
 
#define _SDF_UNIT_MAX_UNITS_BITS   TF_BITS_FOR_VALUES(_SDF_UNIT_MAX_UNITS)
 
#define _SDF_UNIT_TYPES_BITS   TF_BITS_FOR_VALUES(_SDF_UNIT_NUM_TYPES)
 
#define _SDF_SCALAR_VALUE_TYPES
 
#define _SDF_DIMENSIONED_VALUE_TYPES
 
#define SDF_VALUE_TYPES   _SDF_SCALAR_VALUE_TYPES _SDF_DIMENSIONED_VALUE_TYPES
 
#define SDF_VALUE_CPP_TYPE(tup)   HBOOST_PP_TUPLE_ELEM(4, 2, tup)
 
#define SDF_VALUE_CPP_ARRAY_TYPE(tup)   VtArray<HBOOST_PP_TUPLE_ELEM(4, 2, tup)>
 
#define SDF_DECLARE_VALUE_TYPE_TRAITS(r, unused, elem)
 
#define SDF_VALUE_ROLE_NAME_TOKENS
 

Typedefs

typedef std::map< std::string,
VtValue
SdfMapperParametersMap
 A map of mapper parameter names to parameter values. More...
 
typedef std::map< std::string,
std::string
SdfVariantSelectionMap
 A map of reference variant set names to variants in those sets. More...
 
typedef std::map< std::string,
std::vector< std::string > > 
SdfVariantsMap
 A map of variant set names to list of variants in those sets. More...
 
typedef std::map< SdfPath,
SdfPath
SdfRelocatesMap
 A map of source SdfPaths to target SdfPaths for relocation. More...
 
typedef std::map< double, VtValueSdfTimeSampleMap
 A map from sample times to sample values. More...
 
typedef std::map< std::string,
SdfVariantSetSpecHandle > 
SdfVariantSetSpecHandleMap
 

Enumerations

enum  SdfSpecType {
  SdfSpecTypeUnknown = 0, SdfSpecTypeAttribute, SdfSpecTypeConnection, SdfSpecTypeExpression,
  SdfSpecTypeMapper, SdfSpecTypeMapperArg, SdfSpecTypePrim, SdfSpecTypePseudoRoot,
  SdfSpecTypeRelationship, SdfSpecTypeRelationshipTarget, SdfSpecTypeVariant, SdfSpecTypeVariantSet,
  SdfNumSpecTypes
}
 
enum  SdfSpecifier { SdfSpecifierDef, SdfSpecifierOver, SdfSpecifierClass, SdfNumSpecifiers }
 
enum  SdfPermission { SdfPermissionPublic, SdfPermissionPrivate, SdfNumPermissions }
 
enum  SdfVariability { SdfVariabilityVarying, SdfVariabilityUniform, SdfNumVariabilities }
 
enum  SdfAuthoringError { SdfAuthoringErrorUnrecognizedFields, SdfAuthoringErrorUnrecognizedSpecType }
 

Functions

bool SdfIsDefiningSpecifier (SdfSpecifier spec)
 Returns true if the specifier defines a prim. More...
 
SDF_API TfEnum SdfDefaultUnit (TfToken const &typeName)
 Gets the show default unit for the given /a typeName. More...
 
SDF_API const TfEnumSdfDefaultUnit (const TfEnum &unit)
 Gets the show default unit for the given /a unit. More...
 
SDF_API const std::stringSdfUnitCategory (const TfEnum &unit)
 Gets the unit category for a given /a unit. More...
 
SDF_API double SdfConvertUnit (const TfEnum &fromUnit, const TfEnum &toUnit)
 
SDF_API const std::stringSdfGetNameForUnit (const TfEnum &unit)
 Gets the name for a given /a unit. More...
 
SDF_API const TfEnumSdfGetUnitFromName (const std::string &name)
 Gets a unit for the given /a name. More...
 
SDF_API bool SdfValueHasValidType (VtValue const &value)
 Given a value, returns if there is a valid corresponding valueType. More...
 
SDF_API TfType SdfGetTypeForValueTypeName (TfToken const &name)
 
SDF_API SdfValueTypeName SdfGetValueTypeNameForValue (VtValue const &value)
 
SDF_API TfToken SdfGetRoleNameForValueTypeName (TfToken const &typeName)
 
 HBOOST_PP_SEQ_FOR_EACH (SDF_DECLARE_VALUE_TYPE_TRAITS,~, SDF_VALUE_TYPES)
 
SDF_API bool SdfConvertToValidMetadataDictionary (VtDictionary *dict, std::string *errMsg)
 
 TF_DECLARE_PUBLIC_TOKENS (SdfValueRoleNames, SDF_API, SDF_VALUE_ROLE_NAME_TOKENS)
 
 SDF_DECLARE_HANDLES (SdfLayer)
 
 SDF_DECLARE_HANDLES (SdfAttributeSpec)
 
 SDF_DECLARE_HANDLES (SdfPrimSpec)
 
 SDF_DECLARE_HANDLES (SdfPropertySpec)
 
 SDF_DECLARE_HANDLES (SdfSpec)
 
 SDF_DECLARE_HANDLES (SdfRelationshipSpec)
 
 SDF_DECLARE_HANDLES (SdfVariantSetSpec)
 
 SDF_DECLARE_HANDLES (SdfVariantSpec)
 
SDF_API std::ostream & operator<< (std::ostream &out, const SdfSpecifier &spec)
 Writes the string representation of SdfSpecifier to out. More...
 
SDF_API std::ostream & operator<< (std::ostream &out, const SdfRelocatesMap &reloMap)
 Writes the string representation of SdfRelocatesMap to out. More...
 
SDF_API std::ostream & operator<< (std::ostream &out, const SdfTimeSampleMap &sampleMap)
 Writes the string representation of SdfTimeSampleMap to out. More...
 
SDF_API std::ostream & VtStreamOut (const SdfVariantSelectionMap &, std::ostream &)
 
SDF_API std::ostream & operator<< (std::ostream &out, const SdfUnregisteredValue &value)
 Writes the string representation of SdfUnregisteredValue to out. More...
 
SDF_API std::ostream & operator<< (std::ostream &, SdfValueBlock const &)
 
SDF_API std::ostream & operator<< (std::ostream &out, const SdfHumanReadableValue &hrval)
 
SDF_API size_t hash_value (const SdfHumanReadableValue &hrval)
 

Variables

SDF_API TfStaticData< const
Sdf_ValueTypeNamesType,
Sdf_ValueTypeNamesType::_Init
SdfValueTypeNames
 

Detailed Description

Basic Sdf data types

Definition in file types.h.

Macro Definition Documentation

#define _SDF_ANGULAR_UNITS
Value:
((Degrees, "deg", 1.0)) \
((Radians, "rad", 57.2957795130823208768))

Definition at line 231 of file types.h.

#define _SDF_DECLARE_UNIT_ENUM (   r,
  unused,
  elem 
)
Value:
enum _SDF_UNITSLIST_ENUM(elem) { \
};
HBOOST_PP_SEQ_FOR_EACH(SDF_DECLARE_VALUE_TYPE_TRAITS,~, SDF_VALUE_TYPES)
#define _SDF_UNITSLIST_TUPLES(tup)
Definition: types.h:250
#define _SDF_UNITSLIST_ENUM(elem)
Definition: types.h:251
#define _SDF_UNITSLIST_CATEGORY(tup)
Definition: types.h:249
#define _SDF_DECLARE_UNIT_ENUMERANT(r, tag, elem)
Definition: types.h:254

Definition at line 257 of file types.h.

#define _SDF_DECLARE_UNIT_ENUMERANT (   r,
  tag,
  elem 
)    HBOOST_PP_CAT(Sdf ## tag ## Unit, _SDF_UNIT_TAG(elem)),

Definition at line 254 of file types.h.

#define _SDF_DIMENSIONED_VALUE_TYPES
Value:
((Matrix2d, matrix2d, GfMatrix2d, (2,2) )) \
((Matrix3d, matrix3d, GfMatrix3d, (3,3) )) \
((Matrix4d, matrix4d, GfMatrix4d, (4,4) )) \
((Quath, quath, GfQuath, (4) )) \
((Quatf, quatf, GfQuatf, (4) )) \
((Quatd, quatd, GfQuatd, (4) )) \
((Int2, int2, GfVec2i, (2) )) \
((Half2, half2, GfVec2h, (2) )) \
((Float2, float2, GfVec2f, (2) )) \
((Double2, double2, GfVec2d, (2) )) \
((Int3, int3, GfVec3i, (3) )) \
((Half3, half3, GfVec3h, (3) )) \
((Float3, float3, GfVec3f, (3) )) \
((Double3, double3, GfVec3d, (3) )) \
((Int4, int4, GfVec4i, (4) )) \
((Half4, half4, GfVec4h, (4) )) \
((Float4, float4, GfVec4f, (4) )) \
((Double4, double4, GfVec4d, (4) ))
Definition: quath.h:60
Definition: vec4i.h:60
vfloat4 float4
Definition: simd.h:273
Definition: vec2i.h:60
Definition: ImathQuat.h:42
std::array< float, 3 > Float3
Definition: vec3f.h:62
Definition: vec4d.h:62
Definition: quatf.h:59
Definition: vec2d.h:62
Definition: vec4h.h:63
vfloat3 float3
Definition: simd.h:272
Definition: vec2h.h:63
Quat< float > Quatf
Quaternion of type float.
Definition: ImathQuat.h:262
Definition: vec3i.h:60
vint4 int4
Definition: simd.h:270
Definition: vec4f.h:62
Definition: vec2f.h:62
Definition: vec3d.h:62
Definition: quatd.h:59
Definition: vec3h.h:63

Definition at line 359 of file types.h.

#define _SDF_DIMENSIONLESS_UNITS
Value:
((Percent, "%", 0.01)) \
((Default, "default", 1.0))

Definition at line 235 of file types.h.

#define _SDF_LENGTH_UNITS
Value:
((Millimeter, "mm", 0.001)) \
((Centimeter, "cm", 0.01)) \
((Decimeter, "dm", 0.1)) \
((Meter, "m", 1.0)) \
((Kilometer, "km", 1000.0)) \
((Inch, "in", 0.0254)) \
((Foot, "ft", 0.3048)) \
((Yard, "yd", 0.9144)) \
((Mile, "mi", 1609.344))

Definition at line 220 of file types.h.

#define _SDF_MAX_UNITS_OP (   d,
  state,
  list 
)    HBOOST_PP_MAX_D(d, state, HBOOST_PP_SEQ_SIZE(_SDF_UNITSLIST_TUPLES(list)))

Definition at line 266 of file types.h.

#define _SDF_SCALAR_VALUE_TYPES
Value:
((Bool, bool, bool, () )) \
((UChar, uchar, unsigned char, () )) \
((Int, int, int, () )) \
((UInt, uint, unsigned int, () )) \
((Int64, int64, int64_t, () )) \
((UInt64, uint64, uint64_t, () )) \
((Half, half, GfHalf, () )) \
((Float, float, float, () )) \
((Double, double, double, () )) \
((TimeCode, timecode, SdfTimeCode, () )) \
((String, string, std::string, () )) \
((Token, token, TfToken, () )) \
((Asset, asset, SdfAssetPath, () )) \
((Opaque, opaque, SdfOpaqueValue, () ))
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
imath_half_bits_t half
if we're in a C-only context, alias the half bits type to half
Definition: half.h:266
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
unsigned long long uint64
Definition: SYS_Types.h:117
Definition: token.h:87
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER typedef long long unsigned int Int64
Int64 - unsigned 64-bit integer.
Definition: ImathInt64.h:37
long long int64
Definition: SYS_Types.h:116
pxr_half::half GfHalf
A 16-bit floating point data type.
Definition: half.h:41
unsigned int uint
Definition: SYS_Types.h:45
unsigned char uchar
Definition: SYS_Types.h:42
Definition: Types.h:101

Definition at line 343 of file types.h.

#define _SDF_UNIT_MAX_UNITS   HBOOST_PP_LIST_FOLD_LEFT(_SDF_MAX_UNITS_OP, 0, _SDF_UNITS)

Definition at line 268 of file types.h.

#define _SDF_UNIT_MAX_UNITS_BITS   TF_BITS_FOR_VALUES(_SDF_UNIT_MAX_UNITS)

Definition at line 276 of file types.h.

#define _SDF_UNIT_NAME (   tup)    HBOOST_PP_TUPLE_ELEM(3, 1, tup)

Definition at line 246 of file types.h.

#define _SDF_UNIT_NUM_TYPES   HBOOST_PP_LIST_SIZE(_SDF_UNITS)

Definition at line 272 of file types.h.

#define _SDF_UNIT_SCALE (   tup)    HBOOST_PP_TUPLE_ELEM(3, 2, tup)

Definition at line 247 of file types.h.

#define _SDF_UNIT_TAG (   tup)    HBOOST_PP_TUPLE_ELEM(3, 0, tup)

Definition at line 245 of file types.h.

#define _SDF_UNIT_TYPES_BITS   TF_BITS_FOR_VALUES(_SDF_UNIT_NUM_TYPES)

Definition at line 277 of file types.h.

#define _SDF_UNITS
Value:
((Length, _SDF_LENGTH_UNITS), \
((Angular, _SDF_ANGULAR_UNITS), \
((Dimensionless, _SDF_DIMENSIONLESS_UNITS), \
HBOOST_PP_NIL)))
#define _SDF_DIMENSIONLESS_UNITS
Definition: types.h:235
#define _SDF_LENGTH_UNITS
Definition: types.h:220
#define _SDF_ANGULAR_UNITS
Definition: types.h:231

Definition at line 239 of file types.h.

#define _SDF_UNITSLIST_CATEGORY (   tup)    HBOOST_PP_TUPLE_ELEM(2, 0, tup)

Definition at line 249 of file types.h.

#define _SDF_UNITSLIST_ENUM (   elem)
Value:
#define _SDF_UNITSLIST_CATEGORY(tup)
Definition: types.h:249
ARCH_EXPORT void HBOOST_PP_CAT(init_module_, MFB_PACKAGE_NAME)()
Definition: pyModule.h:62

Definition at line 251 of file types.h.

#define _SDF_UNITSLIST_TUPLES (   tup)    HBOOST_PP_TUPLE_ELEM(2, 1, tup)

Definition at line 250 of file types.h.

#define SDF_DECLARE_VALUE_TYPE_TRAITS (   r,
  unused,
  elem 
)
Value:
template <> \
static const bool IsValueType = true; \
}; \
template <> \
static const bool IsValueType = true; \
};

Definition at line 397 of file types.h.

#define SDF_VALUE_CPP_ARRAY_TYPE (   tup)    VtArray<HBOOST_PP_TUPLE_ELEM(4, 2, tup)>

Definition at line 383 of file types.h.

#define SDF_VALUE_CPP_TYPE (   tup)    HBOOST_PP_TUPLE_ELEM(4, 2, tup)

Definition at line 382 of file types.h.

#define SDF_VALUE_ROLE_NAME_TOKENS
Value:
(Point) \
(Normal) \
(Vector) \
(Color) \
(Frame) \
(Transform) \
(PointIndex) \
(EdgeIndex) \
(FaceIndex) \
(Group) \
(TextureCoordinate)

Definition at line 434 of file types.h.

Definition at line 379 of file types.h.

Typedef Documentation

A map of mapper parameter names to parameter values.

Definition at line 280 of file types.h.

typedef std::map<SdfPath, SdfPath> SdfRelocatesMap

A map of source SdfPaths to target SdfPaths for relocation.

Definition at line 292 of file types.h.

typedef std::map<double, VtValue> SdfTimeSampleMap

A map from sample times to sample values.

Definition at line 295 of file types.h.

A map of reference variant set names to variants in those sets.

Definition at line 283 of file types.h.

typedef std::map<std::string, SdfVariantSetSpecHandle> SdfVariantSetSpecHandleMap

Definition at line 460 of file types.h.

typedef std::map<std::string, std::vector<std::string> > SdfVariantsMap

A map of variant set names to list of variants in those sets.

Definition at line 286 of file types.h.

Enumeration Type Documentation

An enum for TfError codes related to authoring operations.

SdfAuthoringError:

  • SdfAuthoringErrorUnrecognizedFields. This error is raised if SdfLayer::TransferContent, or SdfLayer::SetField API is called for layers of differing schema, and fields from the source layer are not recognized by the target layer's schema.
  • SdfAuthoringErrorUnrecognizedSpecType. This error is raised in attempts to create specs on layers with spec types that are not recognized by the layer's schema.
Enumerator
SdfAuthoringErrorUnrecognizedFields 
SdfAuthoringErrorUnrecognizedSpecType 

Definition at line 199 of file types.h.

An enum that defines permission levels.

Permissions control which layers may refer to or express opinions about a prim. Opinions expressed about a prim, or relationships to that prim, by layers that are not allowed permission to access the prim will be ignored.

SdfPermission:

  • SdfPermissionPublic. Public prims can be referred to by anything. (Available to any client.)
  • SdfPermissionPrivate. Private prims can be referred to only within the local layer stack, and not across references or inherits. (Not available to clients.)
  • SdfNumPermission. Internal sentinel value.
Enumerator
SdfPermissionPublic 
SdfPermissionPrivate 
SdfNumPermissions 

Definition at line 154 of file types.h.

An enum that identifies the possible specifiers for an SdfPrimSpec. The SdfSpecifier enum is registered as a TfEnum for converting to and from std::string.

SdfSpecifier:

  • SdfSpecifierDef. Defines a concrete prim.
  • SdfSpecifierOver. Overrides an existing prim.
  • SdfSpecifierClass. Defines an abstract prim.
  • SdfNumSpecifiers. The number of specifiers.
Enumerator
SdfSpecifierDef 
SdfSpecifierOver 
SdfSpecifierClass 
SdfNumSpecifiers 

Definition at line 122 of file types.h.

An enum that specifies the type of an object. Objects are entities that have fields and are addressable by path.

Enumerator
SdfSpecTypeUnknown 
SdfSpecTypeAttribute 
SdfSpecTypeConnection 
SdfSpecTypeExpression 
SdfSpecTypeMapper 
SdfSpecTypeMapperArg 
SdfSpecTypePrim 
SdfSpecTypePseudoRoot 
SdfSpecTypeRelationship 
SdfSpecTypeRelationshipTarget 
SdfSpecTypeVariant 
SdfSpecTypeVariantSet 
SdfNumSpecTypes 

Definition at line 90 of file types.h.

An enum that identifies variability types for attributes. Variability indicates whether the attribute may vary over time and value coordinates, and if its value comes through authoring or or from its owner.

SdfVariability:

  • SdfVariabilityVarying. Varying attributes may be directly authored, animated and affected on by Actions. They are the most flexible.
  • SdfVariabilityUniform. Uniform attributes may be authored only with non-animated values (default values). They cannot be affected by Actions, but they can be connected to other Uniform attributes.
  • SdNumVariabilities. Internal sentinel value.
Enumerator
SdfVariabilityVarying 
SdfVariabilityUniform 
SdfNumVariabilities 

Definition at line 178 of file types.h.

Function Documentation

SDF_API size_t hash_value ( const SdfHumanReadableValue hrval)
HBOOST_PP_SEQ_FOR_EACH ( SDF_DECLARE_VALUE_TYPE_TRAITS  ,
,
SDF_VALUE_TYPES   
)
SDF_API std::ostream& operator<< ( std::ostream &  out,
const SdfSpecifier spec 
)

Writes the string representation of SdfSpecifier to out.

SDF_API std::ostream& operator<< ( std::ostream &  out,
const SdfRelocatesMap reloMap 
)

Writes the string representation of SdfRelocatesMap to out.

SDF_API std::ostream& operator<< ( std::ostream &  out,
const SdfTimeSampleMap sampleMap 
)

Writes the string representation of SdfTimeSampleMap to out.

SDF_API std::ostream& operator<< ( std::ostream &  out,
const SdfUnregisteredValue value 
)

Writes the string representation of SdfUnregisteredValue to out.

SDF_API std::ostream& operator<< ( std::ostream &  ,
SdfValueBlock const  
)
SDF_API std::ostream& operator<< ( std::ostream &  out,
const SdfHumanReadableValue hrval 
)
SDF_DECLARE_HANDLES ( SdfLayer  )
SDF_DECLARE_HANDLES ( SdfAttributeSpec  )
SDF_DECLARE_HANDLES ( SdfPrimSpec  )
SDF_DECLARE_HANDLES ( SdfPropertySpec  )
SDF_DECLARE_HANDLES ( SdfSpec  )
SDF_DECLARE_HANDLES ( SdfRelationshipSpec  )
SDF_DECLARE_HANDLES ( SdfVariantSetSpec  )
SDF_DECLARE_HANDLES ( SdfVariantSpec  )
SDF_API bool SdfConvertToValidMetadataDictionary ( VtDictionary dict,
std::string errMsg 
)

Convert dict to a valid metadata dictionary for scene description. Valid metadata dictionaries have values that are any of SDF_VALUE_TYPES (or VtArrays of those), plus VtDictionary with values of those types (or similarly nested VtDictionaries).

Certain conversions are performed in an attempt to produce a valid metadata dictionary. For example:

Convert std::vector<VtValue> to VtArray<T> where T is the type of the first element in the vector. Fail conversion for empty vectors where a concrete type cannot be inferred.

Convert python sequences to VtArray<T> where T is the type of the first element in the python sequence, when converted to VtValue, if that T is an SDF_VALUE_TYPE). Fail conversion for empty sequences where a concrete type cannot be inferred.

If any values cannot be converted to valid SDF_VALUE_TYPES, omit those elements and add a message to errMsg indicating which values were omitted.

SDF_API double SdfConvertUnit ( const TfEnum fromUnit,
const TfEnum toUnit 
)

Converts from one unit of measure to another. The fromUnit and toUnit units must be of the same type (for example, both of type SdfLengthUnit).

SDF_API TfEnum SdfDefaultUnit ( TfToken const typeName)

Gets the show default unit for the given /a typeName.

SDF_API const TfEnum& SdfDefaultUnit ( const TfEnum unit)

Gets the show default unit for the given /a unit.

SDF_API const std::string& SdfGetNameForUnit ( const TfEnum unit)

Gets the name for a given /a unit.

SDF_API TfToken SdfGetRoleNameForValueTypeName ( TfToken const typeName)

Return role name for typeName. Return empty token if typeName has no associated role name.

SDF_API TfType SdfGetTypeForValueTypeName ( TfToken const name)

Given an sdf valueType name, produce TfType if the type name specifies a valid sdf value type.

SDF_API const TfEnum& SdfGetUnitFromName ( const std::string name)

Gets a unit for the given /a name.

SDF_API SdfValueTypeName SdfGetValueTypeNameForValue ( VtValue const value)

Given a value, produce the sdf valueType name. If you provide a value that does not return true for SdfValueHasValidType, the return value is unspecified.

bool SdfIsDefiningSpecifier ( SdfSpecifier  spec)
inline

Returns true if the specifier defines a prim.

Definition at line 132 of file types.h.

SDF_API const std::string& SdfUnitCategory ( const TfEnum unit)

Gets the unit category for a given /a unit.

SDF_API bool SdfValueHasValidType ( VtValue const value)

Given a value, returns if there is a valid corresponding valueType.

TF_DECLARE_PUBLIC_TOKENS ( SdfValueRoleNames  ,
SDF_API  ,
SDF_VALUE_ROLE_NAME_TOKENS   
)
SDF_API std::ostream& VtStreamOut ( const SdfVariantSelectionMap ,
std::ostream &   
)

Variable Documentation