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
43#include "pxr/base/gf/half.h"
47#include "pxr/base/gf/quatd.h"
48#include "pxr/base/gf/quatf.h"
49#include "pxr/base/gf/quath.h"
50#include "pxr/base/gf/vec2d.h"
51#include "pxr/base/gf/vec2f.h"
52#include "pxr/base/gf/vec2h.h"
53#include "pxr/base/gf/vec2i.h"
54#include "pxr/base/gf/vec3d.h"
55#include "pxr/base/gf/vec3f.h"
56#include "pxr/base/gf/vec3h.h"
57#include "pxr/base/gf/vec3i.h"
58#include "pxr/base/gf/vec4d.h"
59#include "pxr/base/gf/vec4f.h"
60#include "pxr/base/gf/vec4h.h"
61#include "pxr/base/gf/vec4i.h"
62#include "pxr/base/tf/enum.h"
63#include "pxr/base/tf/preprocessorUtilsLite.h"
65#include "pxr/base/tf/token.h"
66#include "pxr/base/tf/type.h"
67#include "pxr/base/vt/array.h"
69#include "pxr/base/vt/value.h"
70
71#include <iosfwd>
72#include <list>
73#include <map>
74#include <stdint.h>
75#include <string>
76#include <typeinfo>
77#include <vector>
78
79PXR_NAMESPACE_OPEN_SCOPE
80
81class SdfPath;
82
86 // The unknown type has a value of 0 so that SdfSpecType() is unknown.
87 SdfSpecTypeUnknown = 0,
88
89 // Real concrete types
90 SdfSpecTypeAttribute,
91 SdfSpecTypeConnection,
92 SdfSpecTypeExpression,
93 SdfSpecTypeMapper,
94 SdfSpecTypeMapperArg,
95 SdfSpecTypePrim,
96 SdfSpecTypePseudoRoot,
97 SdfSpecTypeRelationship,
98 SdfSpecTypeRelationshipTarget,
99 SdfSpecTypeVariant,
100 SdfSpecTypeVariantSet,
101
102 SdfNumSpecTypes
103};
104
118 SdfSpecifierDef,
119 SdfSpecifierOver,
120 SdfSpecifierClass,
121 SdfNumSpecifiers
122};
123
125inline
126bool
128{
129 return (spec != SdfSpecifierOver);
130}
131
150 SdfPermissionPublic,
151 SdfPermissionPrivate,
152
153 SdfNumPermissions
154};
155
174 SdfVariabilityVarying,
175 SdfVariabilityUniform,
176
177 SdfNumVariabilities
178};
179
180
195{
196 SdfAuthoringErrorUnrecognizedFields,
197 SdfAuthoringErrorUnrecognizedSpecType
198};
199
200// Each category of compatible units of measurement is defined by a
201// preprocessor sequence of tuples. Each such sequence gives rise to an enum
202// representing the corresponding unit category. All the unit categories are
203// listed in _SDF_UNITS where each entry is a two-tuple with the unit category
204// name as the first element, and the second element is the units in that
205// category. Each tuple in a unit category sequence corresponds to a unit of
206// measurement represented by an enumerant whose name is given by concatenating
207// 'Sdf', the unit category name, the word 'Unit' and the first entry in the
208// tuple. (E.g. units of category 'Length' are represented by an enum named
209// SdfLengthUnit with enumerants SdfLengthUnitInch, SdfLengthUnitMeter and so
210// forth.) The second element in the tuple is the display name for the unit,
211// and the third element is the relative size of the unit compared to the menv
212// default unit for the unit category (which has a relative size of 1.0).
213// Dimensionless quantities use a special 'Dimensionless' unit category
214// represented by the enum SdfDimensionlessUnit.
215#define _SDF_LENGTH_UNITS \
216((Millimeter, "mm", 0.001)) \
217((Centimeter, "cm", 0.01)) \
218((Decimeter, "dm", 0.1)) \
219((Meter, "m", 1.0)) \
220((Kilometer, "km", 1000.0)) \
221((Inch, "in", 0.0254)) \
222((Foot, "ft", 0.3048)) \
223((Yard, "yd", 0.9144)) \
224((Mile, "mi", 1609.344))
225
226#define _SDF_ANGULAR_UNITS \
227((Degrees, "deg", 1.0)) \
228((Radians, "rad", 57.2957795130823208768))
229
230#define _SDF_DIMENSIONLESS_UNITS \
231((Percent, "%", 0.01)) \
232((Default, "default", 1.0))
233
234#define _SDF_UNITS \
235((Length, _SDF_LENGTH_UNITS), \
236(Angular, _SDF_ANGULAR_UNITS), \
237(Dimensionless, _SDF_DIMENSIONLESS_UNITS))
238
239#define _SDF_UNIT_TAG(tup) TF_PP_TUPLE_ELEM(0, tup)
240#define _SDF_UNIT_NAME(tup) TF_PP_TUPLE_ELEM(1, tup)
241#define _SDF_UNIT_SCALE(tup) TF_PP_TUPLE_ELEM(2, tup)
242
243#define _SDF_UNITSLIST_CATEGORY(tup) TF_PP_TUPLE_ELEM(0, tup)
244#define _SDF_UNITSLIST_TUPLES(tup) TF_PP_TUPLE_ELEM(1, tup)
245#define _SDF_UNITSLIST_ENUM(elem) TF_PP_CAT(TF_PP_CAT(Sdf, \
246 _SDF_UNITSLIST_CATEGORY(elem)), Unit)
247
248#define _SDF_DECLARE_UNIT_ENUMERANT(tag, elem) \
249 TF_PP_CAT(Sdf ## tag ## Unit, _SDF_UNIT_TAG(elem)),
250
251#define _SDF_DECLARE_UNIT_ENUM(elem) \
252enum _SDF_UNITSLIST_ENUM(elem) { \
253 TF_PP_SEQ_FOR_EACH(_SDF_DECLARE_UNIT_ENUMERANT, \
254 _SDF_UNITSLIST_CATEGORY(elem), \
255 _SDF_UNITSLIST_TUPLES(elem)) \
256};
257
258#define _SDF_FOR_EACH_UNITS_IMPL(macro, ...) \
259 TF_PP_FOR_EACH(macro, __VA_ARGS__)
260#define _SDF_FOR_EACH_UNITS(macro, args) \
261 _SDF_FOR_EACH_UNITS_IMPL(macro, TF_PP_EAT_PARENS(args))
262
263// On Windows this call to _SDF_FOR_EACH_UNITS generates a C4003 warning.
264// This is harmless, but we disable the warning here so that external
265// projects that include this header don't run into it as well.
266ARCH_PRAGMA_PUSH
267ARCH_PRAGMA_MACRO_TOO_FEW_ARGUMENTS
268_SDF_FOR_EACH_UNITS(_SDF_DECLARE_UNIT_ENUM, _SDF_UNITS)
269ARCH_PRAGMA_POP
270
272typedef std::map<std::string, VtValue> SdfMapperParametersMap;
273
275typedef std::map<std::string, std::string> SdfVariantSelectionMap;
276
278typedef std::map<std::string, std::vector<std::string> > SdfVariantsMap;
279
281// Note: This map needs to be lexicographically sorted for some downstream
282// clients, so SdfPath::FastLessThan is explicitly omitted as
283// the Compare template parameter.
284typedef std::map<SdfPath, SdfPath> SdfRelocatesMap;
285
288typedef std::pair<SdfPath, SdfPath> SdfRelocate;
289
291typedef std::vector<SdfRelocate> SdfRelocates;
292
294typedef std::map<double, VtValue> SdfTimeSampleMap;
295
297SDF_API TfEnum SdfDefaultUnit( TfToken const &typeName );
298
300SDF_API const TfEnum &SdfDefaultUnit( const TfEnum &unit );
301
303SDF_API const std::string &SdfUnitCategory( const TfEnum &unit );
304
307SDF_API double SdfConvertUnit( const TfEnum &fromUnit, const TfEnum &toUnit );
308
310SDF_API const std::string &SdfGetNameForUnit( const TfEnum &unit );
311
313SDF_API const TfEnum &SdfGetUnitFromName( const std::string &name );
314
316SDF_API bool SdfValueHasValidType(VtValue const& value);
317
321
326
330
331// Sdf allows a specific set of types for attribute and metadata values.
332// These types and some additional metadata are listed in the preprocessor
333// sequence of tuples below. First element is a tag name that is appended to
334// 'SdfValueType' to produce the C++ traits type for the value type.
335// Second element is the value type name, third element is the corresponding
336// C++ type, and the fourth element is the tuple of tuple dimensions.
337//
338// Libraries may extend this list and define additional value types.
339// When doing so, the type must be declared using the SDF_DECLARE_VALUE_TYPE
340// macro below. The type must also be registered in the associated schema using
341// SdfSchema::_RegisterValueType(s).
342#define _SDF_SCALAR_VALUE_TYPES \
343 ((Bool, bool, bool, () )) \
344 ((UChar, uchar, unsigned char, () )) \
345 ((Int, int, int, () )) \
346 ((UInt, uint, unsigned int, () )) \
347 ((Int64, int64, int64_t, () )) \
348 ((UInt64, uint64, uint64_t, () )) \
349 ((Half, half, GfHalf, () )) \
350 ((Float, float, float, () )) \
351 ((Double, double, double, () )) \
352 ((TimeCode, timecode, SdfTimeCode, () )) \
353 ((String, string, std::string, () )) \
354 ((Token, token, TfToken, () )) \
355 ((Asset, asset, SdfAssetPath, () )) \
356 ((Opaque, opaque, SdfOpaqueValue, () )) \
357 ((PathExpression, pathExpression, SdfPathExpression, () ))
358
359#define _SDF_DIMENSIONED_VALUE_TYPES \
360 ((Matrix2d, matrix2d, GfMatrix2d, (2,2) )) \
361 ((Matrix3d, matrix3d, GfMatrix3d, (3,3) )) \
362 ((Matrix4d, matrix4d, GfMatrix4d, (4,4) )) \
363 ((Quath, quath, GfQuath, (4) )) \
364 ((Quatf, quatf, GfQuatf, (4) )) \
365 ((Quatd, quatd, GfQuatd, (4) )) \
366 ((Int2, int2, GfVec2i, (2) )) \
367 ((Half2, half2, GfVec2h, (2) )) \
368 ((Float2, float2, GfVec2f, (2) )) \
369 ((Double2, double2, GfVec2d, (2) )) \
370 ((Int3, int3, GfVec3i, (3) )) \
371 ((Half3, half3, GfVec3h, (3) )) \
372 ((Float3, float3, GfVec3f, (3) )) \
373 ((Double3, double3, GfVec3d, (3) )) \
374 ((Int4, int4, GfVec4i, (4) )) \
375 ((Half4, half4, GfVec4h, (4) )) \
376 ((Float4, float4, GfVec4f, (4) )) \
377 ((Double4, double4, GfVec4d, (4) ))
378
379#define SDF_VALUE_TYPES _SDF_SCALAR_VALUE_TYPES _SDF_DIMENSIONED_VALUE_TYPES
380
381// Accessors for individual elements in the value types tuples.
382#define SDF_VALUE_CPP_TYPE(tup) TF_PP_TUPLE_ELEM(2, tup)
383#define SDF_VALUE_CPP_ARRAY_TYPE(tup) VtArray<TF_PP_TUPLE_ELEM(2, tup)>
384
385template <class T>
386struct SdfValueTypeTraits {
387 static const bool IsValueType = false;
388};
389
390// Allow character arrays to be treated as Sdf value types.
391// Sdf converts character arrays to strings for scene description.
392template <int N>
393struct SdfValueTypeTraits<char[N]> {
394 static const bool IsValueType = true;
395};
396
397#define SDF_DECLARE_VALUE_TYPE_TRAITS(unused, elem) \
398template <> \
399struct SdfValueTypeTraits<SDF_VALUE_CPP_TYPE(elem)> { \
400 static const bool IsValueType = true; \
401}; \
402template <> \
403struct SdfValueTypeTraits<SDF_VALUE_CPP_ARRAY_TYPE(elem)> { \
404 static const bool IsValueType = true; \
405};
406
407TF_PP_SEQ_FOR_EACH(SDF_DECLARE_VALUE_TYPE_TRAITS, ~, SDF_VALUE_TYPES);
408
430SDF_API
431bool
433
434#define SDF_VALUE_ROLE_NAME_TOKENS \
435 (Point) \
436 (Normal) \
437 (Vector) \
438 (Color) \
439 (Frame) \
440 (Transform) \
441 (PointIndex) \
442 (EdgeIndex) \
443 (FaceIndex) \
444 (Group) \
445 (TextureCoordinate)
446
447TF_DECLARE_PUBLIC_TOKENS(SdfValueRoleNames, SDF_API, SDF_VALUE_ROLE_NAME_TOKENS);
448
449SDF_DECLARE_HANDLES(SdfLayer);
450
451SDF_DECLARE_HANDLES(SdfAttributeSpec);
452SDF_DECLARE_HANDLES(SdfPrimSpec);
453SDF_DECLARE_HANDLES(SdfPropertySpec);
454SDF_DECLARE_HANDLES(SdfSpec);
455SDF_DECLARE_HANDLES(SdfRelationshipSpec);
456SDF_DECLARE_HANDLES(SdfVariantSetSpec);
457SDF_DECLARE_HANDLES(SdfVariantSpec);
458
459typedef std::map<std::string, SdfVariantSetSpecHandle>
460 SdfVariantSetSpecHandleMap;
461
463SDF_API
464std::ostream & operator<<( std::ostream &out, const SdfSpecifier &spec );
465
467SDF_API
468std::ostream & operator<<( std::ostream &out,
469 const SdfRelocatesMap &reloMap );
470
472SDF_API
473std::ostream & operator<<( std::ostream &out,
474 const SdfRelocates &relocates );
475
477SDF_API
478std::ostream & operator<<( std::ostream &out,
479 const SdfTimeSampleMap &sampleMap );
480
481SDF_API
482std::ostream &VtStreamOut(const SdfVariantSelectionMap &, std::ostream &);
483
493{
494public:
497
499 SDF_API explicit SdfUnregisteredValue(const std::string &value);
500
502 SDF_API explicit SdfUnregisteredValue(const VtDictionary &value);
503
505 SDF_API explicit SdfUnregisteredValue(const SdfUnregisteredValueListOp &value);
506
508 const VtValue& GetValue() const {
509 return _value;
510 }
511
513 friend size_t hash_value(const SdfUnregisteredValue &uv) {
514 return uv._value.GetHash();
515 }
516
518 SDF_API bool operator==(const SdfUnregisteredValue &other) const;
519
521 SDF_API bool operator!=(const SdfUnregisteredValue &other) const;
522
523private:
524 VtValue _value;
525};
526
528SDF_API std::ostream &operator << (std::ostream &out, const SdfUnregisteredValue &value);
529
530class Sdf_ValueTypeNamesType {
531 Sdf_ValueTypeNamesType(const Sdf_ValueTypeNamesType&) = delete;
532 Sdf_ValueTypeNamesType& operator=(const Sdf_ValueTypeNamesType&) = delete;
533public:
534 SdfValueTypeName Bool;
535 SdfValueTypeName UChar, Int, UInt, Int64, UInt64;
536 SdfValueTypeName Half, Float, Double, TimeCode;
537 SdfValueTypeName String, Token, Asset;
538 SdfValueTypeName Int2, Int3, Int4;
539 SdfValueTypeName Half2, Half3, Half4;
540 SdfValueTypeName Float2, Float3, Float4;
541 SdfValueTypeName Double2, Double3, Double4;
542 SdfValueTypeName Point3h, Point3f, Point3d;
543 SdfValueTypeName Vector3h, Vector3f, Vector3d;
544 SdfValueTypeName Normal3h, Normal3f, Normal3d;
545 SdfValueTypeName Color3h, Color3f, Color3d;
546 SdfValueTypeName Color4h, Color4f, Color4d;
547 SdfValueTypeName Quath, Quatf, Quatd;
548 SdfValueTypeName Matrix2d, Matrix3d, Matrix4d;
549 SdfValueTypeName Frame4d;
550 SdfValueTypeName TexCoord2h, TexCoord2f, TexCoord2d;
551 SdfValueTypeName TexCoord3h, TexCoord3f, TexCoord3d;
552 SdfValueTypeName Opaque;
553 SdfValueTypeName Group;
554 SdfValueTypeName PathExpression;
555
556 SdfValueTypeName BoolArray;
557 SdfValueTypeName UCharArray, IntArray, UIntArray, Int64Array, UInt64Array;
558 SdfValueTypeName HalfArray, FloatArray, DoubleArray, TimeCodeArray;
559 SdfValueTypeName StringArray, TokenArray, AssetArray;
560 SdfValueTypeName Int2Array, Int3Array, Int4Array;
561 SdfValueTypeName Half2Array, Half3Array, Half4Array;
562 SdfValueTypeName Float2Array, Float3Array, Float4Array;
563 SdfValueTypeName Double2Array, Double3Array, Double4Array;
564 SdfValueTypeName Point3hArray, Point3fArray, Point3dArray;
565 SdfValueTypeName Vector3hArray, Vector3fArray, Vector3dArray;
566 SdfValueTypeName Normal3hArray, Normal3fArray, Normal3dArray;
567 SdfValueTypeName Color3hArray, Color3fArray, Color3dArray;
568 SdfValueTypeName Color4hArray, Color4fArray, Color4dArray;
569 SdfValueTypeName QuathArray, QuatfArray, QuatdArray;
570 SdfValueTypeName Matrix2dArray, Matrix3dArray, Matrix4dArray;
571 SdfValueTypeName Frame4dArray;
572 SdfValueTypeName TexCoord2hArray, TexCoord2fArray, TexCoord2dArray;
573 SdfValueTypeName TexCoord3hArray, TexCoord3fArray, TexCoord3dArray;
574 SdfValueTypeName PathExpressionArray;
575
576 SDF_API ~Sdf_ValueTypeNamesType();
577 struct _Init {
578 SDF_API static const Sdf_ValueTypeNamesType* New();
579 };
580
581 // For Pixar internal backwards compatibility.
582 TfToken GetSerializationName(const SdfValueTypeName&) const;
583 TfToken GetSerializationName(const VtValue&) const;
584 TfToken GetSerializationName(const TfToken&) const;
585
586private:
587 friend const Sdf_ValueTypeNamesType* Sdf_InitializeValueTypeNames();
588 Sdf_ValueTypeNamesType();
589};
590
591extern SDF_API TfStaticData<const Sdf_ValueTypeNamesType,
592 Sdf_ValueTypeNamesType::_Init> SdfValueTypeNames;
593
609 bool operator==(const SdfValueBlock& block) const { return true; }
610 bool operator!=(const SdfValueBlock& block) const { return false; }
611
612private:
613 friend inline size_t hash_value(const SdfValueBlock &block) { return 0; }
614};
615
616// Write out the string representation of a block.
617SDF_API std::ostream& operator<<(std::ostream&, SdfValueBlock const&);
618
619// A class that represents a human-readable value. This is used for the special
620// purpose of producing layers that serialize field values in alternate ways; to
621// produce more human-readable output, for example.
622struct SdfHumanReadableValue {
623 SdfHumanReadableValue() = default;
624 explicit SdfHumanReadableValue(std::string const &text) : _text(text) {}
625
626 bool operator==(SdfHumanReadableValue const &other) const {
627 return GetText() == other.GetText();
628 }
629 bool operator!=(SdfHumanReadableValue const &other) const {
630 return !(*this == other);
631 }
632
633 std::string const &GetText() const { return _text; }
634private:
635 std::string _text;
636};
637
638SDF_API
639std::ostream &operator<<(std::ostream &out, const SdfHumanReadableValue &hrval);
640
641SDF_API
642size_t hash_value(const SdfHumanReadableValue &hrval);
643
644PXR_NAMESPACE_CLOSE_SCOPE
645
646#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:493
const VtValue & GetValue() const
Returns the wrapped VtValue specified in the constructor.
Definition: types.h:508
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:513
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.
Pragmas for controlling compiler-specific behaviors.
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:608
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:195
SdfSpecType
An enum that specifies the type of an object.
Definition: types.h:85
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:117
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:288
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:278
ARCH_PRAGMA_PUSH ARCH_PRAGMA_MACRO_TOO_FEW_ARGUMENTS ARCH_PRAGMA_POP typedef std::map< std::string, VtValue > SdfMapperParametersMap
A map of mapper parameter names to parameter values.
Definition: types.h:272
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:173
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:275
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:291
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:149
bool SdfIsDefiningSpecifier(SdfSpecifier spec)
Returns true if the specifier defines a prim.
Definition: types.h:127
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:284
std::map< double, VtValue > SdfTimeSampleMap
A map from sample times to sample values.
Definition: types.h:294