Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24#ifndef PXR_USD_SDF_TYPES_H
25#define PXR_USD_SDF_TYPES_H
26
29
30#include "pxr/pxr.h"
31#include "pxr/usd/sdf/api.h"
34#include "pxr/usd/sdf/listOp.h"
35#include "pxr/usd/sdf/opaqueValue.h"
36#include "pxr/usd/sdf/pathExpression.h"
38#include "pxr/usd/sdf/valueTypeName.h"
39
42#include "pxr/base/gf/half.h"
46#include "pxr/base/gf/quatd.h"
47#include "pxr/base/gf/quatf.h"
48#include "pxr/base/gf/quath.h"
49#include "pxr/base/gf/vec2d.h"
50#include "pxr/base/gf/vec2f.h"
51#include "pxr/base/gf/vec2h.h"
52#include "pxr/base/gf/vec2i.h"
53#include "pxr/base/gf/vec3d.h"
54#include "pxr/base/gf/vec3f.h"
55#include "pxr/base/gf/vec3h.h"
56#include "pxr/base/gf/vec3i.h"
57#include "pxr/base/gf/vec4d.h"
58#include "pxr/base/gf/vec4f.h"
59#include "pxr/base/gf/vec4h.h"
60#include "pxr/base/gf/vec4i.h"
61#include "pxr/base/tf/enum.h"
62#include "pxr/base/tf/preprocessorUtilsLite.h"
64#include "pxr/base/tf/token.h"
65#include "pxr/base/tf/type.h"
66#include "pxr/base/vt/array.h"
68#include "pxr/base/vt/value.h"
69
70#include <iosfwd>
71#include <list>
72#include <map>
73#include <stdint.h>
74#include <string>
75#include <typeinfo>
76#include <vector>
77
78PXR_NAMESPACE_OPEN_SCOPE
79
80class SdfPath;
81
85 // The unknown type has a value of 0 so that SdfSpecType() is unknown.
86 SdfSpecTypeUnknown = 0,
87
88 // Real concrete types
89 SdfSpecTypeAttribute,
90 SdfSpecTypeConnection,
91 SdfSpecTypeExpression,
92 SdfSpecTypeMapper,
93 SdfSpecTypeMapperArg,
94 SdfSpecTypePrim,
95 SdfSpecTypePseudoRoot,
96 SdfSpecTypeRelationship,
97 SdfSpecTypeRelationshipTarget,
98 SdfSpecTypeVariant,
99 SdfSpecTypeVariantSet,
100
101 SdfNumSpecTypes
102};
103
117 SdfSpecifierDef,
118 SdfSpecifierOver,
119 SdfSpecifierClass,
120 SdfNumSpecifiers
121};
122
124inline
125bool
127{
128 return (spec != SdfSpecifierOver);
129}
130
149 SdfPermissionPublic,
150 SdfPermissionPrivate,
151
152 SdfNumPermissions
153};
154
173 SdfVariabilityVarying,
174 SdfVariabilityUniform,
175
176 SdfNumVariabilities
177};
178
179
194{
195 SdfAuthoringErrorUnrecognizedFields,
196 SdfAuthoringErrorUnrecognizedSpecType
197};
198
199// Each category of compatible units of measurement is defined by a
200// preprocessor sequence of tuples. Each such sequence gives rise to an enum
201// representing the corresponding unit category. All the unit categories are
202// listed in _SDF_UNITS where each entry is a two-tuple with the unit category
203// name as the first element, and the second element is the units in that
204// category. Each tuple in a unit category sequence corresponds to a unit of
205// measurement represented by an enumerant whose name is given by concatenating
206// 'Sdf', the unit category name, the word 'Unit' and the first entry in the
207// tuple. (E.g. units of category 'Length' are represented by an enum named
208// SdfLengthUnit with enumerants SdfLengthUnitInch, SdfLengthUnitMeter and so
209// forth.) The second element in the tuple is the display name for the unit,
210// and the third element is the relative size of the unit compared to the menv
211// default unit for the unit category (which has a relative size of 1.0).
212// Dimensionless quantities use a special 'Dimensionless' unit category
213// represented by the enum SdfDimensionlessUnit.
214#define _SDF_LENGTH_UNITS \
215((Millimeter, "mm", 0.001)) \
216((Centimeter, "cm", 0.01)) \
217((Decimeter, "dm", 0.1)) \
218((Meter, "m", 1.0)) \
219((Kilometer, "km", 1000.0)) \
220((Inch, "in", 0.0254)) \
221((Foot, "ft", 0.3048)) \
222((Yard, "yd", 0.9144)) \
223((Mile, "mi", 1609.344))
224
225#define _SDF_ANGULAR_UNITS \
226((Degrees, "deg", 1.0)) \
227((Radians, "rad", 57.2957795130823208768))
228
229#define _SDF_DIMENSIONLESS_UNITS \
230((Percent, "%", 0.01)) \
231((Default, "default", 1.0))
232
233#define _SDF_UNITS \
234((Length, _SDF_LENGTH_UNITS), \
235(Angular, _SDF_ANGULAR_UNITS), \
236(Dimensionless, _SDF_DIMENSIONLESS_UNITS))
237
238#define _SDF_UNIT_TAG(tup) TF_PP_TUPLE_ELEM(0, tup)
239#define _SDF_UNIT_NAME(tup) TF_PP_TUPLE_ELEM(1, tup)
240#define _SDF_UNIT_SCALE(tup) TF_PP_TUPLE_ELEM(2, tup)
241
242#define _SDF_UNITSLIST_CATEGORY(tup) TF_PP_TUPLE_ELEM(0, tup)
243#define _SDF_UNITSLIST_TUPLES(tup) TF_PP_TUPLE_ELEM(1, tup)
244#define _SDF_UNITSLIST_ENUM(elem) TF_PP_CAT(TF_PP_CAT(Sdf, \
245 _SDF_UNITSLIST_CATEGORY(elem)), Unit)
246
247#define _SDF_DECLARE_UNIT_ENUMERANT(tag, elem) \
248 TF_PP_CAT(Sdf ## tag ## Unit, _SDF_UNIT_TAG(elem)),
249
250#define _SDF_DECLARE_UNIT_ENUM(elem) \
251enum _SDF_UNITSLIST_ENUM(elem) { \
252 TF_PP_SEQ_FOR_EACH(_SDF_DECLARE_UNIT_ENUMERANT, \
253 _SDF_UNITSLIST_CATEGORY(elem), \
254 _SDF_UNITSLIST_TUPLES(elem)) \
255};
256
257#define _SDF_FOR_EACH_UNITS_IMPL(macro, ...) \
258 TF_PP_FOR_EACH(macro, __VA_ARGS__)
259#define _SDF_FOR_EACH_UNITS(macro, args) \
260 _SDF_FOR_EACH_UNITS_IMPL(macro, TF_PP_EAT_PARENS(args))
261
262_SDF_FOR_EACH_UNITS(_SDF_DECLARE_UNIT_ENUM, _SDF_UNITS)
263
264
265typedef std::map<std::string, VtValue> SdfMapperParametersMap;
266
268typedef std::map<std::string, std::string> SdfVariantSelectionMap;
269
271typedef std::map<std::string, std::vector<std::string> > SdfVariantsMap;
272
274// Note: This map needs to be lexicographically sorted for some downstream
275// clients, so SdfPath::FastLessThan is explicitly omitted as
276// the Compare template parameter.
278
282
284typedef std::vector<SdfRelocate> SdfRelocates;
285
287typedef std::map<double, VtValue> SdfTimeSampleMap;
288
290SDF_API TfEnum SdfDefaultUnit( TfToken const &typeName );
291
293SDF_API const TfEnum &SdfDefaultUnit( const TfEnum &unit );
294
296SDF_API const std::string &SdfUnitCategory( const TfEnum &unit );
297
300SDF_API double SdfConvertUnit( const TfEnum &fromUnit, const TfEnum &toUnit );
301
303SDF_API const std::string &SdfGetNameForUnit( const TfEnum &unit );
304
306SDF_API const TfEnum &SdfGetUnitFromName( const std::string &name );
307
309SDF_API bool SdfValueHasValidType(VtValue const& value);
310
314
319
323
324// Sdf allows a specific set of types for attribute and metadata values.
325// These types and some additional metadata are listed in the preprocessor
326// sequence of tuples below. First element is a tag name that is appended to
327// 'SdfValueType' to produce the C++ traits type for the value type.
328// Second element is the value type name, third element is the corresponding
329// C++ type, and the fourth element is the tuple of tuple dimensions.
330//
331// Libraries may extend this list and define additional value types.
332// When doing so, the type must be declared using the SDF_DECLARE_VALUE_TYPE
333// macro below. The type must also be registered in the associated schema using
334// SdfSchema::_RegisterValueType(s).
335#define _SDF_SCALAR_VALUE_TYPES \
336 ((Bool, bool, bool, () )) \
337 ((UChar, uchar, unsigned char, () )) \
338 ((Int, int, int, () )) \
339 ((UInt, uint, unsigned int, () )) \
340 ((Int64, int64, int64_t, () )) \
341 ((UInt64, uint64, uint64_t, () )) \
342 ((Half, half, GfHalf, () )) \
343 ((Float, float, float, () )) \
344 ((Double, double, double, () )) \
345 ((TimeCode, timecode, SdfTimeCode, () )) \
346 ((String, string, std::string, () )) \
347 ((Token, token, TfToken, () )) \
348 ((Asset, asset, SdfAssetPath, () )) \
349 ((Opaque, opaque, SdfOpaqueValue, () )) \
350 ((PathExpression, pathExpression, SdfPathExpression, () ))
351
352#define _SDF_DIMENSIONED_VALUE_TYPES \
353 ((Matrix2d, matrix2d, GfMatrix2d, (2,2) )) \
354 ((Matrix3d, matrix3d, GfMatrix3d, (3,3) )) \
355 ((Matrix4d, matrix4d, GfMatrix4d, (4,4) )) \
356 ((Quath, quath, GfQuath, (4) )) \
357 ((Quatf, quatf, GfQuatf, (4) )) \
358 ((Quatd, quatd, GfQuatd, (4) )) \
359 ((Int2, int2, GfVec2i, (2) )) \
360 ((Half2, half2, GfVec2h, (2) )) \
361 ((Float2, float2, GfVec2f, (2) )) \
362 ((Double2, double2, GfVec2d, (2) )) \
363 ((Int3, int3, GfVec3i, (3) )) \
364 ((Half3, half3, GfVec3h, (3) )) \
365 ((Float3, float3, GfVec3f, (3) )) \
366 ((Double3, double3, GfVec3d, (3) )) \
367 ((Int4, int4, GfVec4i, (4) )) \
368 ((Half4, half4, GfVec4h, (4) )) \
369 ((Float4, float4, GfVec4f, (4) )) \
370 ((Double4, double4, GfVec4d, (4) ))
371
372#define SDF_VALUE_TYPES _SDF_SCALAR_VALUE_TYPES _SDF_DIMENSIONED_VALUE_TYPES
373
374// Accessors for individual elements in the value types tuples.
375#define SDF_VALUE_CPP_TYPE(tup) TF_PP_TUPLE_ELEM(2, tup)
376#define SDF_VALUE_CPP_ARRAY_TYPE(tup) VtArray<TF_PP_TUPLE_ELEM(2, tup)>
377
378template <class T>
379struct SdfValueTypeTraits {
380 static const bool IsValueType = false;
381};
382
383// Allow character arrays to be treated as Sdf value types.
384// Sdf converts character arrays to strings for scene description.
385template <int N>
386struct SdfValueTypeTraits<char[N]> {
387 static const bool IsValueType = true;
388};
389
390#define SDF_DECLARE_VALUE_TYPE_TRAITS(unused, elem) \
391template <> \
392struct SdfValueTypeTraits<SDF_VALUE_CPP_TYPE(elem)> { \
393 static const bool IsValueType = true; \
394}; \
395template <> \
396struct SdfValueTypeTraits<SDF_VALUE_CPP_ARRAY_TYPE(elem)> { \
397 static const bool IsValueType = true; \
398};
399
400TF_PP_SEQ_FOR_EACH(SDF_DECLARE_VALUE_TYPE_TRAITS, ~, SDF_VALUE_TYPES);
401
423SDF_API
424bool
426
427#define SDF_VALUE_ROLE_NAME_TOKENS \
428 (Point) \
429 (Normal) \
430 (Vector) \
431 (Color) \
432 (Frame) \
433 (Transform) \
434 (PointIndex) \
435 (EdgeIndex) \
436 (FaceIndex) \
437 (Group) \
438 (TextureCoordinate)
439
440TF_DECLARE_PUBLIC_TOKENS(SdfValueRoleNames, SDF_API, SDF_VALUE_ROLE_NAME_TOKENS);
441
442SDF_DECLARE_HANDLES(SdfLayer);
443
444SDF_DECLARE_HANDLES(SdfAttributeSpec);
445SDF_DECLARE_HANDLES(SdfPrimSpec);
446SDF_DECLARE_HANDLES(SdfPropertySpec);
447SDF_DECLARE_HANDLES(SdfSpec);
448SDF_DECLARE_HANDLES(SdfRelationshipSpec);
449SDF_DECLARE_HANDLES(SdfVariantSetSpec);
450SDF_DECLARE_HANDLES(SdfVariantSpec);
451
452typedef std::map<std::string, SdfVariantSetSpecHandle>
453 SdfVariantSetSpecHandleMap;
454
456SDF_API
457std::ostream & operator<<( std::ostream &out, const SdfSpecifier &spec );
458
460SDF_API
461std::ostream & operator<<( std::ostream &out,
462 const SdfRelocatesMap &reloMap );
463
465SDF_API
466std::ostream & operator<<( std::ostream &out,
467 const SdfRelocates &relocates );
468
470SDF_API
471std::ostream & operator<<( std::ostream &out,
472 const SdfTimeSampleMap &sampleMap );
473
474SDF_API
475std::ostream &VtStreamOut(const SdfVariantSelectionMap &, std::ostream &);
476
486{
487public:
490
492 SDF_API explicit SdfUnregisteredValue(const std::string &value);
493
495 SDF_API explicit SdfUnregisteredValue(const VtDictionary &value);
496
498 SDF_API explicit SdfUnregisteredValue(const SdfUnregisteredValueListOp &value);
499
501 const VtValue& GetValue() const {
502 return _value;
503 }
504
506 friend size_t hash_value(const SdfUnregisteredValue &uv) {
507 return uv._value.GetHash();
508 }
509
511 SDF_API bool operator==(const SdfUnregisteredValue &other) const;
512
514 SDF_API bool operator!=(const SdfUnregisteredValue &other) const;
515
516private:
517 VtValue _value;
518};
519
521SDF_API std::ostream &operator << (std::ostream &out, const SdfUnregisteredValue &value);
522
523class Sdf_ValueTypeNamesType {
524 Sdf_ValueTypeNamesType(const Sdf_ValueTypeNamesType&) = delete;
525 Sdf_ValueTypeNamesType& operator=(const Sdf_ValueTypeNamesType&) = delete;
526public:
527 SdfValueTypeName Bool;
528 SdfValueTypeName UChar, Int, UInt, Int64, UInt64;
529 SdfValueTypeName Half, Float, Double, TimeCode;
530 SdfValueTypeName String, Token, Asset;
531 SdfValueTypeName Int2, Int3, Int4;
532 SdfValueTypeName Half2, Half3, Half4;
533 SdfValueTypeName Float2, Float3, Float4;
534 SdfValueTypeName Double2, Double3, Double4;
535 SdfValueTypeName Point3h, Point3f, Point3d;
536 SdfValueTypeName Vector3h, Vector3f, Vector3d;
537 SdfValueTypeName Normal3h, Normal3f, Normal3d;
538 SdfValueTypeName Color3h, Color3f, Color3d;
539 SdfValueTypeName Color4h, Color4f, Color4d;
540 SdfValueTypeName Quath, Quatf, Quatd;
541 SdfValueTypeName Matrix2d, Matrix3d, Matrix4d;
542 SdfValueTypeName Frame4d;
543 SdfValueTypeName TexCoord2h, TexCoord2f, TexCoord2d;
544 SdfValueTypeName TexCoord3h, TexCoord3f, TexCoord3d;
545 SdfValueTypeName Opaque;
546 SdfValueTypeName Group;
547 SdfValueTypeName PathExpression;
548
549 SdfValueTypeName BoolArray;
550 SdfValueTypeName UCharArray, IntArray, UIntArray, Int64Array, UInt64Array;
551 SdfValueTypeName HalfArray, FloatArray, DoubleArray, TimeCodeArray;
552 SdfValueTypeName StringArray, TokenArray, AssetArray;
553 SdfValueTypeName Int2Array, Int3Array, Int4Array;
554 SdfValueTypeName Half2Array, Half3Array, Half4Array;
555 SdfValueTypeName Float2Array, Float3Array, Float4Array;
556 SdfValueTypeName Double2Array, Double3Array, Double4Array;
557 SdfValueTypeName Point3hArray, Point3fArray, Point3dArray;
558 SdfValueTypeName Vector3hArray, Vector3fArray, Vector3dArray;
559 SdfValueTypeName Normal3hArray, Normal3fArray, Normal3dArray;
560 SdfValueTypeName Color3hArray, Color3fArray, Color3dArray;
561 SdfValueTypeName Color4hArray, Color4fArray, Color4dArray;
562 SdfValueTypeName QuathArray, QuatfArray, QuatdArray;
563 SdfValueTypeName Matrix2dArray, Matrix3dArray, Matrix4dArray;
564 SdfValueTypeName Frame4dArray;
565 SdfValueTypeName TexCoord2hArray, TexCoord2fArray, TexCoord2dArray;
566 SdfValueTypeName TexCoord3hArray, TexCoord3fArray, TexCoord3dArray;
567 SdfValueTypeName PathExpressionArray;
568
569 SDF_API ~Sdf_ValueTypeNamesType();
570 struct _Init {
571 SDF_API static const Sdf_ValueTypeNamesType* New();
572 };
573
574 // For Pixar internal backwards compatibility.
575 TfToken GetSerializationName(const SdfValueTypeName&) const;
576 TfToken GetSerializationName(const VtValue&) const;
577 TfToken GetSerializationName(const TfToken&) const;
578
579private:
580 friend const Sdf_ValueTypeNamesType* Sdf_InitializeValueTypeNames();
581 Sdf_ValueTypeNamesType();
582};
583
584extern SDF_API TfStaticData<const Sdf_ValueTypeNamesType,
585 Sdf_ValueTypeNamesType::_Init> SdfValueTypeNames;
586
602 bool operator==(const SdfValueBlock& block) const { return true; }
603 bool operator!=(const SdfValueBlock& block) const { return false; }
604
605private:
606 friend inline size_t hash_value(const SdfValueBlock &block) { return 0; }
607};
608
609// Write out the string representation of a block.
610SDF_API std::ostream& operator<<(std::ostream&, SdfValueBlock const&);
611
612// A class that represents a human-readable value. This is used for the special
613// purpose of producing layers that serialize field values in alternate ways; to
614// produce more human-readable output, for example.
615struct SdfHumanReadableValue {
616 SdfHumanReadableValue() = default;
617 explicit SdfHumanReadableValue(std::string const &text) : _text(text) {}
618
619 bool operator==(SdfHumanReadableValue const &other) const {
620 return GetText() == other.GetText();
621 }
622 bool operator!=(SdfHumanReadableValue const &other) const {
623 return !(*this == other);
624 }
625
626 std::string const &GetText() const { return _text; }
627private:
628 std::string _text;
629};
630
631SDF_API
632std::ostream &operator<<(std::ostream &out, const SdfHumanReadableValue &hrval);
633
634SDF_API
635size_t hash_value(const SdfHumanReadableValue &hrval);
636
637PXR_NAMESPACE_CLOSE_SCOPE
638
639#endif // PXR_USD_SDF_TYPES_H
A subclass of SdfPropertySpec that holds typed data.
Definition: attributeSpec.h:57
A scene description container that can combine with other such containers to form simple component as...
Definition: layer.h:100
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
Represents a prim description in an SdfLayer object.
Definition: primSpec.h:75
Base class for SdfAttributeSpec and SdfRelationshipSpec.
Definition: propertySpec.h:60
A property that contains a reference to one or more SdfPrimSpec instances.
Base class for all Sdf spec classes.
Definition: spec.h:50
Stores a representation of the value for an unregistered metadata field encountered during text layer...
Definition: types.h:486
const VtValue & GetValue() const
Returns the wrapped VtValue specified in the constructor.
Definition: types.h:501
SDF_API bool operator==(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are equal.
SDF_API SdfUnregisteredValue()
Wraps an empty VtValue.
SDF_API SdfUnregisteredValue(const SdfUnregisteredValueListOp &value)
Wraps a SdfUnregisteredValueListOp.
SDF_API bool operator!=(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are not equal.
friend size_t hash_value(const SdfUnregisteredValue &uv)
Hash.
Definition: types.h:506
SDF_API SdfUnregisteredValue(const VtDictionary &value)
Wraps a VtDictionary.
SDF_API SdfUnregisteredValue(const std::string &value)
Wraps a std::string.
Represents a value type name, i.e.
Definition: valueTypeName.h:88
Represents a coherent set of alternate representations for part of a scene.
Represents a single variant in a variant set.
Definition: variantSpec.h:56
An enum class that records both enum type and enum value.
Definition: enum.h:137
Create or return a previously created object instance of global data.
Definition: staticData.h:113
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
TfType represents a dynamic runtime type.
Definition: type.h:65
A map with string keys and VtValue values.
Definition: dictionary.h:60
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:164
VT_API size_t GetHash() const
Return a hash code for the held object by calling VtHashValue() on it.
Demangle C++ typenames generated by the typeid() facility.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
This header serves to simply bring in the half float datatype and provide a hash_value function.
size_t hash_value(const half h)
Overload hash_value for half.
Definition: half.h:45
Define integral types.
STL namespace.
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:98
A special value type that can be used to explicitly author an opinion for an attribute's default valu...
Definition: types.h:601
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
SDF_API TfType SdfGetTypeForValueTypeName(TfToken const &name)
Given an sdf valueType name, produce TfType if the type name specifies a valid sdf value type.
SdfAuthoringError
An enum for TfError codes related to authoring operations.
Definition: types.h:194
SdfSpecType
An enum that specifies the type of an object.
Definition: types.h:84
SDF_API bool SdfValueHasValidType(VtValue const &value)
Given a value, returns if there is a valid corresponding valueType.
SdfSpecifier
An enum that identifies the possible specifiers for an SdfPrimSpec.
Definition: types.h:116
std::map< std::string, VtValue > SdfMapperParametersMap
A map of mapper parameter names to parameter values.
Definition: types.h:265
SDF_API const std::string & SdfUnitCategory(const TfEnum &unit)
Gets the unit category for a given /a unit.
SDF_API TfToken SdfGetRoleNameForValueTypeName(TfToken const &typeName)
Return role name for typeName.
std::pair< SdfPath, SdfPath > SdfRelocate
A single relocate specifying a source SdfPath and a target SdfPath for a relocation.
Definition: types.h:281
std::map< std::string, std::vector< std::string > > SdfVariantsMap
A map of variant set names to list of variants in those sets.
Definition: types.h:271
SDF_API double SdfConvertUnit(const TfEnum &fromUnit, const TfEnum &toUnit)
Converts from one unit of measure to another.
SdfVariability
An enum that identifies variability types for attributes.
Definition: types.h:172
SDF_API TfEnum SdfDefaultUnit(TfToken const &typeName)
Gets the show default unit for the given /a typeName.
std::map< std::string, std::string > SdfVariantSelectionMap
A map of reference variant set names to variants in those sets.
Definition: types.h:268
SDF_API SdfValueTypeName SdfGetValueTypeNameForValue(VtValue const &value)
Given a value, produce the sdf valueType name.
std::vector< SdfRelocate > SdfRelocates
A vector of relocation source path to target path pairs.
Definition: types.h:284
SDF_API const std::string & SdfGetNameForUnit(const TfEnum &unit)
Gets the name for a given /a unit.
SdfPermission
An enum that defines permission levels.
Definition: types.h:148
bool SdfIsDefiningSpecifier(SdfSpecifier spec)
Returns true if the specifier defines a prim.
Definition: types.h:126
SDF_API bool SdfConvertToValidMetadataDictionary(VtDictionary *dict, std::string *errMsg)
Convert dict to a valid metadata dictionary for scene description.
SDF_API const TfEnum & SdfGetUnitFromName(const std::string &name)
Gets a unit for the given /a name.
std::map< SdfPath, SdfPath > SdfRelocatesMap
A map of source SdfPaths to target SdfPaths for relocation.
Definition: types.h:277
std::map< double, VtValue > SdfTimeSampleMap
A map from sample times to sample values.
Definition: types.h:287