HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
types.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_SDF_TYPES_H
8 #define PXR_USD_SDF_TYPES_H
9 
10 /// \file sdf/types.h
11 /// Basic Sdf data types
12 
13 #include "pxr/pxr.h"
14 #include "pxr/usd/sdf/api.h"
15 #include "pxr/usd/sdf/assetPath.h"
17 #include "pxr/usd/sdf/listOp.h"
20 #include "pxr/usd/sdf/timeCode.h"
22 
23 #include "pxr/base/arch/demangle.h"
24 #include "pxr/base/arch/inttypes.h"
25 #include "pxr/base/arch/pragmas.h"
26 #include "pxr/base/gf/half.h"
27 #include "pxr/base/gf/matrix2d.h"
28 #include "pxr/base/gf/matrix3d.h"
29 #include "pxr/base/gf/matrix4d.h"
30 #include "pxr/base/gf/quatd.h"
31 #include "pxr/base/gf/quatf.h"
32 #include "pxr/base/gf/quath.h"
33 #include "pxr/base/gf/vec2d.h"
34 #include "pxr/base/gf/vec2f.h"
35 #include "pxr/base/gf/vec2h.h"
36 #include "pxr/base/gf/vec2i.h"
37 #include "pxr/base/gf/vec3d.h"
38 #include "pxr/base/gf/vec3f.h"
39 #include "pxr/base/gf/vec3h.h"
40 #include "pxr/base/gf/vec3i.h"
41 #include "pxr/base/gf/vec4d.h"
42 #include "pxr/base/gf/vec4f.h"
43 #include "pxr/base/gf/vec4h.h"
44 #include "pxr/base/gf/vec4i.h"
45 #include "pxr/base/tf/enum.h"
48 #include "pxr/base/tf/token.h"
49 #include "pxr/base/tf/type.h"
50 #include "pxr/base/vt/array.h"
51 #include "pxr/base/vt/dictionary.h"
52 #include "pxr/base/vt/value.h"
53 
54 #include <iosfwd>
55 #include <list>
56 #include <map>
57 #include <stdint.h>
58 #include <string>
59 #include <typeinfo>
60 #include <vector>
61 
63 
64 class SdfPath;
65 
66 /// An enum that specifies the type of an object. Objects
67 /// are entities that have fields and are addressable by path.
69  // The unknown type has a value of 0 so that SdfSpecType() is unknown.
71 
72  // Real concrete types
84 
86 };
87 
88 /// An enum that identifies the possible specifiers for an
89 /// SdfPrimSpec. The SdfSpecifier enum is registered as a TfEnum
90 /// for converting to and from <c>std::string</c>.
91 ///
92 /// <b>SdfSpecifier:</b>
93 /// <ul>
94 /// <li><b>SdfSpecifierDef.</b> Defines a concrete prim.
95 /// <li><b>SdfSpecifierOver.</b> Overrides an existing prim.
96 /// <li><b>SdfSpecifierClass.</b> Defines an abstract prim.
97 /// <li><b>SdfNumSpecifiers.</b> The number of specifiers.
98 /// </ul>
99 ///
105 };
106 
107 /// Returns true if the specifier defines a prim.
108 inline
109 bool
111 {
112  return (spec != SdfSpecifierOver);
113 }
114 
115 /// An enum that defines permission levels.
116 ///
117 /// Permissions control which layers may refer to or express
118 /// opinions about a prim. Opinions expressed about a prim, or
119 /// relationships to that prim, by layers that are not allowed
120 /// permission to access the prim will be ignored.
121 ///
122 /// <b>SdfPermission:</b>
123 /// <ul>
124 /// <li><b>SdfPermissionPublic.</b> Public prims can be referred to by
125 /// anything. (Available to any client.)
126 /// <li><b>SdfPermissionPrivate.</b> Private prims can be referred to
127 /// only within the local layer stack, and not across references
128 /// or inherits. (Not available to clients.)
129 /// <li><b>SdfNumPermission.</b> Internal sentinel value.
130 /// </ul>
131 ///
135 
137 };
138 
139 /// An enum that identifies variability types for attributes.
140 /// Variability indicates whether the attribute may vary over time and
141 /// value coordinates, and if its value comes through authoring or
142 /// or from its owner.
143 ///
144 /// <b>SdfVariability:</b>
145 /// <ul>
146 /// <li><b>SdfVariabilityVarying.</b> Varying attributes may be directly
147 /// authored, animated and affected on by Actions. They are the
148 /// most flexible.
149 /// <li><b>SdfVariabilityUniform.</b> Uniform attributes may be authored
150 /// only with non-animated values (default values). They cannot
151 /// be affected by Actions, but they can be connected to other
152 /// Uniform attributes.
153 /// <li><b>SdNumVariabilities.</b> Internal sentinel value.
154 /// </ul>
155 ///
159 
161 };
162 
163 
164 /// An enum for TfError codes related to authoring operations.
165 ///
166 /// <b>SdfAuthoringError:</b>
167 /// <ul>
168 /// <li><b>SdfAuthoringErrorUnrecognizedFields.</b> This error is raised if
169 /// SdfLayer::TransferContent, or SdfLayer::SetField API is called
170 /// for layers of differing schema, and fields from the source layer
171 /// are not recognized by the target layer's schema.
172 /// <li><b>SdfAuthoringErrorUnrecognizedSpecType.</b> This error is raised
173 /// in attempts to create specs on layers with spec types that are
174 /// not recognized by the layer's schema.
175 /// </ul>
176 ///
178 {
181 };
182 
183 // Each category of compatible units of measurement is defined by a
184 // preprocessor sequence of tuples. Each such sequence gives rise to an enum
185 // representing the corresponding unit category. All the unit categories are
186 // listed in _SDF_UNITS where each entry is a two-tuple with the unit category
187 // name as the first element, and the second element is the units in that
188 // category. Each tuple in a unit category sequence corresponds to a unit of
189 // measurement represented by an enumerant whose name is given by concatenating
190 // 'Sdf', the unit category name, the word 'Unit' and the first entry in the
191 // tuple. (E.g. units of category 'Length' are represented by an enum named
192 // SdfLengthUnit with enumerants SdfLengthUnitInch, SdfLengthUnitMeter and so
193 // forth.) The second element in the tuple is the display name for the unit,
194 // and the third element is the relative size of the unit compared to the menv
195 // default unit for the unit category (which has a relative size of 1.0).
196 // Dimensionless quantities use a special 'Dimensionless' unit category
197 // represented by the enum SdfDimensionlessUnit.
198 #define _SDF_LENGTH_UNITS \
199 ((Millimeter, "mm", 0.001)) \
200 ((Centimeter, "cm", 0.01)) \
201 ((Decimeter, "dm", 0.1)) \
202 ((Meter, "m", 1.0)) \
203 ((Kilometer, "km", 1000.0)) \
204 ((Inch, "in", 0.0254)) \
205 ((Foot, "ft", 0.3048)) \
206 ((Yard, "yd", 0.9144)) \
207 ((Mile, "mi", 1609.344))
208 
209 #define _SDF_ANGULAR_UNITS \
210 ((Degrees, "deg", 1.0)) \
211 ((Radians, "rad", 57.2957795130823208768))
212 
213 #define _SDF_DIMENSIONLESS_UNITS \
214 ((Percent, "%", 0.01)) \
215 ((Default, "default", 1.0))
216 
217 #define _SDF_UNITS \
218 ((Length, _SDF_LENGTH_UNITS), \
219 (Angular, _SDF_ANGULAR_UNITS), \
220 (Dimensionless, _SDF_DIMENSIONLESS_UNITS))
221 
222 #define _SDF_UNIT_TAG(tup) TF_PP_TUPLE_ELEM(0, tup)
223 #define _SDF_UNIT_NAME(tup) TF_PP_TUPLE_ELEM(1, tup)
224 #define _SDF_UNIT_SCALE(tup) TF_PP_TUPLE_ELEM(2, tup)
225 
226 #define _SDF_UNITSLIST_CATEGORY(tup) TF_PP_TUPLE_ELEM(0, tup)
227 #define _SDF_UNITSLIST_TUPLES(tup) TF_PP_TUPLE_ELEM(1, tup)
228 #define _SDF_UNITSLIST_ENUM(elem) TF_PP_CAT(TF_PP_CAT(Sdf, \
229  _SDF_UNITSLIST_CATEGORY(elem)), Unit)
230 
231 #define _SDF_DECLARE_UNIT_ENUMERANT(tag, elem) \
232  TF_PP_CAT(Sdf ## tag ## Unit, _SDF_UNIT_TAG(elem)),
233 
234 #define _SDF_DECLARE_UNIT_ENUM(elem) \
235 enum _SDF_UNITSLIST_ENUM(elem) { \
236  TF_PP_SEQ_FOR_EACH(_SDF_DECLARE_UNIT_ENUMERANT, \
237  _SDF_UNITSLIST_CATEGORY(elem), \
238  _SDF_UNITSLIST_TUPLES(elem)) \
239 };
240 
241 #define _SDF_FOR_EACH_UNITS_IMPL(macro, ...) \
242  TF_PP_FOR_EACH(macro, __VA_ARGS__)
243 #define _SDF_FOR_EACH_UNITS(macro, args) \
244  _SDF_FOR_EACH_UNITS_IMPL(macro, TF_PP_EAT_PARENS(args))
245 
246 // On Windows this call to _SDF_FOR_EACH_UNITS generates a C4003 warning.
247 // This is harmless, but we disable the warning here so that external
248 // projects that include this header don't run into it as well.
253 
254 /// A map of mapper parameter names to parameter values.
255 typedef std::map<std::string, VtValue> SdfMapperParametersMap;
256 
257 /// A map of reference variant set names to variants in those sets.
258 typedef std::map<std::string, std::string> SdfVariantSelectionMap;
259 
260 /// A map of variant set names to list of variants in those sets.
261 typedef std::map<std::string, std::vector<std::string> > SdfVariantsMap;
262 
263 /// A map of source SdfPaths to target SdfPaths for relocation.
264 // Note: This map needs to be lexicographically sorted for some downstream
265 // clients, so SdfPath::FastLessThan is explicitly omitted as
266 // the Compare template parameter.
267 typedef std::map<SdfPath, SdfPath> SdfRelocatesMap;
268 
269 /// A single relocate specifying a source SdfPath and a target SdfPath for a
270 /// relocation.
271 typedef std::pair<SdfPath, SdfPath> SdfRelocate;
272 
273 /// A vector of relocation source path to target path pairs.
274 typedef std::vector<SdfRelocate> SdfRelocates;
275 
276 /// A map from sample times to sample values.
277 typedef std::map<double, VtValue> SdfTimeSampleMap;
278 
279 /// Gets the show default unit for the given /a typeName.
280 SDF_API TfEnum SdfDefaultUnit( TfToken const &typeName );
281 
282 /// Gets the show default unit for the given /a unit.
283 SDF_API const TfEnum &SdfDefaultUnit( const TfEnum &unit );
284 
285 /// Gets the unit category for a given /a unit.
286 SDF_API const std::string &SdfUnitCategory( const TfEnum &unit );
287 
288 /// Converts from one unit of measure to another. The \a fromUnit and \a toUnit
289 /// units must be of the same type (for example, both of type SdfLengthUnit).
290 SDF_API double SdfConvertUnit( const TfEnum &fromUnit, const TfEnum &toUnit );
291 
292 /// Gets the name for a given /a unit.
293 SDF_API const std::string &SdfGetNameForUnit( const TfEnum &unit );
294 
295 /// Gets a unit for the given /a name
296 SDF_API const TfEnum &SdfGetUnitFromName( const std::string &name );
297 
298 /// Given a value, returns if there is a valid corresponding valueType.
300 
301 /// Given an sdf valueType name, produce TfType if the type name specifies a
302 /// valid sdf value type.
304 
305 /// Given a value, produce the sdf valueType name. If you provide a value that
306 /// does not return true for SdfValueHasValidType, the return value is
307 /// unspecified.
309 
310 /// Return role name for \p typeName. Return empty token if \p typeName has no
311 /// associated role name.
313 
314 // Sdf allows a specific set of types for attribute and metadata values.
315 // These types and some additional metadata are listed in the preprocessor
316 // sequence of tuples below. First element is a tag name that is appended to
317 // 'SdfValueType' to produce the C++ traits type for the value type.
318 // Second element is the value type name, third element is the corresponding
319 // C++ type, and the fourth element is the tuple of tuple dimensions.
320 //
321 // Libraries may extend this list and define additional value types.
322 // When doing so, the type must be declared using the SDF_DECLARE_VALUE_TYPE
323 // macro below. The type must also be registered in the associated schema using
324 // SdfSchema::_RegisterValueType(s).
325 #define _SDF_SCALAR_VALUE_TYPES \
326  ((Bool, bool, bool, () )) \
327  ((UChar, uchar, unsigned char, () )) \
328  ((Int, int, int, () )) \
329  ((UInt, uint, unsigned int, () )) \
330  ((Int64, int64, int64_t, () )) \
331  ((UInt64, uint64, uint64_t, () )) \
332  ((Half, half, GfHalf, () )) \
333  ((Float, float, float, () )) \
334  ((Double, double, double, () )) \
335  ((TimeCode, timecode, SdfTimeCode, () )) \
336  ((String, string, std::string, () )) \
337  ((Token, token, TfToken, () )) \
338  ((Asset, asset, SdfAssetPath, () )) \
339  ((Opaque, opaque, SdfOpaqueValue, () )) \
340  ((PathExpression, pathExpression, SdfPathExpression, () ))
341 
342 #define _SDF_DIMENSIONED_VALUE_TYPES \
343  ((Matrix2d, matrix2d, GfMatrix2d, (2,2) )) \
344  ((Matrix3d, matrix3d, GfMatrix3d, (3,3) )) \
345  ((Matrix4d, matrix4d, GfMatrix4d, (4,4) )) \
346  ((Quath, quath, GfQuath, (4) )) \
347  ((Quatf, quatf, GfQuatf, (4) )) \
348  ((Quatd, quatd, GfQuatd, (4) )) \
349  ((Int2, int2, GfVec2i, (2) )) \
350  ((Half2, half2, GfVec2h, (2) )) \
351  ((Float2, float2, GfVec2f, (2) )) \
352  ((Double2, double2, GfVec2d, (2) )) \
353  ((Int3, int3, GfVec3i, (3) )) \
354  ((Half3, half3, GfVec3h, (3) )) \
355  ((Float3, float3, GfVec3f, (3) )) \
356  ((Double3, double3, GfVec3d, (3) )) \
357  ((Int4, int4, GfVec4i, (4) )) \
358  ((Half4, half4, GfVec4h, (4) )) \
359  ((Float4, float4, GfVec4f, (4) )) \
360  ((Double4, double4, GfVec4d, (4) ))
361 
362 #define SDF_VALUE_TYPES _SDF_SCALAR_VALUE_TYPES _SDF_DIMENSIONED_VALUE_TYPES
363 
364 // Accessors for individual elements in the value types tuples.
365 #define SDF_VALUE_CPP_TYPE(tup) TF_PP_TUPLE_ELEM(2, tup)
366 #define SDF_VALUE_CPP_ARRAY_TYPE(tup) VtArray<TF_PP_TUPLE_ELEM(2, tup)>
367 
368 template <class T>
370  static const bool IsValueType = false;
371 };
372 
373 // Allow character arrays to be treated as Sdf value types.
374 // Sdf converts character arrays to strings for scene description.
375 template <int N>
376 struct SdfValueTypeTraits<char[N]> {
377  static const bool IsValueType = true;
378 };
379 
380 #define SDF_DECLARE_VALUE_TYPE_TRAITS(unused, elem) \
381 template <> \
382 struct SdfValueTypeTraits<SDF_VALUE_CPP_TYPE(elem)> { \
383  static const bool IsValueType = true; \
384 }; \
385 template <> \
386 struct SdfValueTypeTraits<SDF_VALUE_CPP_ARRAY_TYPE(elem)> { \
387  static const bool IsValueType = true; \
388 };
389 
391 
392 /// Convert \p dict to a valid metadata dictionary for scene description. Valid
393 /// metadata dictionaries have values that are any of SDF_VALUE_TYPES (or
394 /// VtArrays of those), plus VtDictionary with values of those types (or
395 /// similarly nested VtDictionaries).
396 ///
397 /// Certain conversions are performed in an attempt to produce a valid metadata
398 /// dictionary. For example:
399 ///
400 /// Convert std::vector<VtValue> to VtArray<T> where T is the type of the first
401 /// element in the vector. Fail conversion for empty vectors where a concrete
402 /// type cannot be inferred.
403 ///
404 /// Convert python sequences to VtArray<T> where T is the type of the first
405 /// element in the python sequence, when converted to VtValue, if that T is an
406 /// SDF_VALUE_TYPE). Fail conversion for empty sequences where a concrete type
407 /// cannot be inferred.
408 ///
409 /// If any values cannot be converted to valid SDF_VALUE_TYPES, omit those
410 /// elements and add a message to \p errMsg indicating which values were
411 /// omitted.
412 ///
413 SDF_API
414 bool
415 SdfConvertToValidMetadataDictionary(VtDictionary *dict, std::string *errMsg);
416 
417 #define SDF_VALUE_ROLE_NAME_TOKENS \
418  (Point) \
419  (Normal) \
420  (Vector) \
421  (Color) \
422  (Frame) \
423  (Transform) \
424  (PointIndex) \
425  (EdgeIndex) \
426  (FaceIndex) \
427  (Group) \
428  (TextureCoordinate)
429 
431 
433 
441 
442 typedef std::map<std::string, SdfVariantSetSpecHandle>
444 
445 /// Writes the string representation of \c SdfSpecifier to \a out.
446 SDF_API
447 std::ostream & operator<<( std::ostream &out, const SdfSpecifier &spec );
448 
449 /// Writes the string representation of \c SdfRelocatesMap to \a out.
450 SDF_API
451 std::ostream & operator<<( std::ostream &out,
452  const SdfRelocatesMap &reloMap );
453 
454 /// Writes the string representation of \c SdfRelocates to \a out.
455 SDF_API
456 std::ostream & operator<<( std::ostream &out,
457  const SdfRelocates &relocates );
458 
459 /// Writes the string representation of \c SdfTimeSampleMap to \a out.
460 SDF_API
461 std::ostream & operator<<( std::ostream &out,
462  const SdfTimeSampleMap &sampleMap );
463 
464 SDF_API
465 std::ostream &VtStreamOut(const SdfVariantSelectionMap &, std::ostream &);
466 
467 /// \class SdfUnregisteredValue
468 /// Stores a representation of the value for an unregistered metadata
469 /// field encountered during text layer parsing.
470 ///
471 /// This provides the ability to serialize this data to a layer, as
472 /// well as limited inspection and editing capabilities (e.g., moving
473 /// this data to a different spec or field) even when the data type
474 /// of the value isn't known.
476 {
477 public:
478  /// Wraps an empty VtValue
480 
481  /// Wraps a std::string
482  SDF_API explicit SdfUnregisteredValue(const std::string &value);
483 
484  /// Wraps a VtDictionary
485  SDF_API explicit SdfUnregisteredValue(const VtDictionary &value);
486 
487  /// Wraps a SdfUnregisteredValueListOp
489 
490  /// Returns the wrapped VtValue specified in the constructor
491  const VtValue& GetValue() const {
492  return _value;
493  }
494 
495  /// Hash.
496  friend size_t hash_value(const SdfUnregisteredValue &uv) {
497  return uv._value.GetHash();
498  }
499 
500  /// Returns true if the wrapped VtValues are equal
501  SDF_API bool operator==(const SdfUnregisteredValue &other) const;
502 
503  /// Returns true if the wrapped VtValues are not equal
504  SDF_API bool operator!=(const SdfUnregisteredValue &other) const;
505 
506 private:
507  VtValue _value;
508 };
509 
510 /// Writes the string representation of \c SdfUnregisteredValue to \a out.
511 SDF_API std::ostream &operator << (std::ostream &out, const SdfUnregisteredValue &value);
512 
515  Sdf_ValueTypeNamesType& operator=(const Sdf_ValueTypeNamesType&) = delete;
516 public:
538 
558 
560  struct _Init {
561  SDF_API static const Sdf_ValueTypeNamesType* New();
562  };
563 
564  // For Pixar internal backwards compatibility.
566  TfToken GetSerializationName(const VtValue&) const;
567  TfToken GetSerializationName(const TfToken&) const;
568 
569 private:
572 };
573 
576 
577 /// \class SdfValueBlock
578 /// A special value type that can be used to explicitly author an
579 /// opinion for an attribute's default value or time sample value
580 /// that represents having no value. Note that this is different
581 /// from not having a value authored.
582 ///
583 /// One could author such a value in two ways.
584 ///
585 /// \code
586 /// attribute->SetDefaultValue(VtValue(SdfValueBlock());
587 /// ...
588 /// layer->SetTimeSample(attribute->GetPath(), 101, VtValue(SdfValueBlock()));
589 /// \endcode
590 ///
591 struct SdfValueBlock {
592  bool operator==(const SdfValueBlock& block) const { return true; }
593  bool operator!=(const SdfValueBlock& block) const { return false; }
594 
595 private:
596  friend inline size_t hash_value(const SdfValueBlock &block) { return 0; }
597 };
598 
599 // Write out the string representation of a block.
600 SDF_API std::ostream& operator<<(std::ostream&, SdfValueBlock const&);
601 
602 // A class that represents a human-readable value. This is used for the special
603 // purpose of producing layers that serialize field values in alternate ways; to
604 // produce more human-readable output, for example.
606  SdfHumanReadableValue() = default;
607  explicit SdfHumanReadableValue(std::string const &text) : _text(text) {}
608 
609  bool operator==(SdfHumanReadableValue const &other) const {
610  return GetText() == other.GetText();
611  }
612  bool operator!=(SdfHumanReadableValue const &other) const {
613  return !(*this == other);
614  }
615 
616  std::string const &GetText() const { return _text; }
617 private:
618  std::string _text;
619 };
620 
621 SDF_API
622 std::ostream &operator<<(std::ostream &out, const SdfHumanReadableValue &hrval);
623 
624 SDF_API
625 size_t hash_value(const SdfHumanReadableValue &hrval);
626 
628 
629 #endif // PXR_USD_SDF_TYPES_H
SdfValueTypeName Normal3d
Definition: types.h:527
SDF_API TfType SdfGetTypeForValueTypeName(TfToken const &name)
SdfValueTypeName Float2Array
Definition: types.h:545
Definition: layer.h:81
SdfValueTypeName Color4dArray
Definition: types.h:551
SdfValueTypeName IntArray
Definition: types.h:540
SdfValueTypeName Color3fArray
Definition: types.h:550
SdfValueTypeName Double4
Definition: types.h:524
SdfValueTypeName Token
Definition: types.h:520
SdfValueTypeName QuatdArray
Definition: types.h:552
SdfValueTypeName UCharArray
Definition: types.h:540
friend size_t hash_value(const SdfValueBlock &block)
Definition: types.h:596
SdfValueTypeName TexCoord2fArray
Definition: types.h:555
SdfValueTypeName Half
Definition: types.h:519
SdfValueTypeName Asset
Definition: types.h:520
SdfValueTypeName HalfArray
Definition: types.h:541
SdfValueTypeName QuatfArray
Definition: types.h:552
SdfValueTypeName Matrix2dArray
Definition: types.h:553
SdfValueTypeName Color4f
Definition: types.h:529
SDF_API TfToken SdfGetRoleNameForValueTypeName(TfToken const &typeName)
SdfValueTypeName Int4
Definition: types.h:521
std::map< SdfPath, SdfPath > SdfRelocatesMap
A map of source SdfPaths to target SdfPaths for relocation.
Definition: types.h:267
SdfValueTypeName Point3h
Definition: types.h:525
SdfValueTypeName DoubleArray
Definition: types.h:541
GA_API const UT_StringHolder uv
SdfValueTypeName Int4Array
Definition: types.h:543
SdfValueTypeName Frame4dArray
Definition: types.h:554
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:261
GLsizei const GLfloat * value
Definition: glcorearb.h:824
SdfValueTypeName TokenArray
Definition: types.h:542
SdfValueTypeName Normal3hArray
Definition: types.h:549
SdfValueTypeName TexCoord3fArray
Definition: types.h:556
#define ARCH_PRAGMA_POP
Definition: pragmas.h:159
SdfValueTypeName Vector3hArray
Definition: types.h:548
SdfValueTypeName Vector3fArray
Definition: types.h:548
std::map< std::string, std::string > SdfVariantSelectionMap
A map of reference variant set names to variants in those sets.
Definition: types.h:258
Definition: spec.h:32
SdfValueTypeName Color4fArray
Definition: types.h:551
SdfValueTypeName UInt64
Definition: types.h:518
friend const Sdf_ValueTypeNamesType * Sdf_InitializeValueTypeNames()
SdfValueTypeName UChar
Definition: types.h:518
SdfValueTypeName Half2
Definition: types.h:522
Definition: enum.h:119
SdfValueTypeName Normal3f
Definition: types.h:527
SdfValueTypeName Int3
Definition: types.h:521
#define SDF_VALUE_ROLE_NAME_TOKENS
Definition: types.h:417
SDF_API const TfEnum & SdfGetUnitFromName(const std::string &name)
Gets a unit for the given /a name.
SdfValueTypeName TexCoord3d
Definition: types.h:534
TF_PP_SEQ_FOR_EACH(_TS_SUPPORT_DATA_TYPE,~, TS_SPLINE_SUPPORTED_VALUE_TYPES) template< class T > inline const expr bool TsSplineIsValidSampleType
True if template parameter T is a supported spline sampling vertex type.
SdfValueTypeName TexCoord2hArray
Definition: types.h:555
SdfHumanReadableValue()=default
SdfValueTypeName Point3hArray
Definition: types.h:547
SdfValueTypeName Half2Array
Definition: types.h:544
SdfValueTypeName TimeCode
Definition: types.h:519
TF_DECLARE_PUBLIC_TOKENS(SdfValueRoleNames, SDF_API, SDF_VALUE_ROLE_NAME_TOKENS)
SdfValueTypeName TexCoord2h
Definition: types.h:533
HDX_API std::ostream & operator<<(std::ostream &out, const HdxShaderInputs &pv)
SdfValueTypeName Vector3h
Definition: types.h:526
class SdfListOp< class SdfUnregisteredValue > SdfUnregisteredValueListOp
Definition: listOp.h:375
SdfValueTypeName Normal3fArray
Definition: types.h:549
SdfValueTypeName Matrix4dArray
Definition: types.h:553
SdfValueTypeName Vector3dArray
Definition: types.h:548
SdfValueTypeName Point3fArray
Definition: types.h:547
SdfValueTypeName Int3Array
Definition: types.h:543
SdfValueTypeName FloatArray
Definition: types.h:541
SdfValueTypeName Double
Definition: types.h:519
SdfValueTypeName Half3
Definition: types.h:522
SdfValueTypeName Frame4d
Definition: types.h:532
SdfValueTypeName Normal3h
Definition: types.h:527
SdfValueTypeName StringArray
Definition: types.h:542
SdfValueTypeName TexCoord2f
Definition: types.h:533
SdfValueTypeName Quath
Definition: types.h:530
SdfValueTypeName Color4d
Definition: types.h:529
SDF_API bool SdfConvertToValidMetadataDictionary(VtDictionary *dict, std::string *errMsg)
SdfValueTypeName Opaque
Definition: types.h:535
SDF_API SdfValueTypeName SdfGetValueTypeNameForValue(VtValue const &value)
Definition: token.h:70
SdfValueTypeName Double2Array
Definition: types.h:546
#define ARCH_PRAGMA_PUSH
Definition: pragmas.h:155
SdfValueTypeName Color3h
Definition: types.h:528
SdfValueTypeName Int2Array
Definition: types.h:543
SdfValueTypeName Matrix3d
Definition: types.h:531
SdfValueTypeName Float
Definition: types.h:519
bool SdfIsDefiningSpecifier(SdfSpecifier spec)
Returns true if the specifier defines a prim.
Definition: types.h:110
SDF_API TfEnum SdfDefaultUnit(TfToken const &typeName)
Gets the show default unit for the given /a typeName.
SdfValueTypeName UIntArray
Definition: types.h:540
SdfValueTypeName PathExpression
Definition: types.h:537
SdfValueTypeName Float4Array
Definition: types.h:545
SdfValueTypeName TexCoord2dArray
Definition: types.h:555
SdfValueTypeName Color3f
Definition: types.h:528
SdfValueTypeName Color3d
Definition: types.h:528
SdfValueTypeName Float2
Definition: types.h:523
SDF_API std::ostream & VtStreamOut(const SdfVariantSelectionMap &, std::ostream &)
std::map< std::string, SdfVariantSetSpecHandle > SdfVariantSetSpecHandleMap
Definition: types.h:443
SdfValueTypeName Matrix2d
Definition: types.h:531
SdfSpecifier
Definition: types.h:100
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
SdfValueTypeName Float3
Definition: types.h:523
SDF_DECLARE_HANDLES(SdfLayer)
SdfValueTypeName Color4h
Definition: types.h:529
GLuint const GLchar * name
Definition: glcorearb.h:786
const VtValue & GetValue() const
Returns the wrapped VtValue specified in the constructor.
Definition: types.h:491
SdfValueTypeName PathExpressionArray
Definition: types.h:557
std::string const & GetText() const
Definition: types.h:616
SDF_API bool operator==(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are equal.
Definition: path.h:273
SdfValueTypeName Quatf
Definition: types.h:530
SdfAuthoringError
Definition: types.h:177
SdfValueTypeName TimeCodeArray
Definition: types.h:541
SdfValueTypeName Point3f
Definition: types.h:525
SdfValueTypeName Double3
Definition: types.h:524
SdfValueTypeName UInt
Definition: types.h:518
SdfValueTypeName Double3Array
Definition: types.h:546
SdfValueTypeName String
Definition: types.h:520
SdfValueTypeName Float4
Definition: types.h:523
SdfValueTypeName UInt64Array
Definition: types.h:540
bool operator==(SdfHumanReadableValue const &other) const
Definition: types.h:609
SdfValueTypeName Matrix4d
Definition: types.h:531
SdfVariability
Definition: types.h:156
SdfValueTypeName Matrix3dArray
Definition: types.h:553
#define SDF_API
Definition: api.h:23
SdfValueTypeName Color3dArray
Definition: types.h:550
SdfValueTypeName Point3d
Definition: types.h:525
SDF_API TfStaticData< const Sdf_ValueTypeNamesType, Sdf_ValueTypeNamesType::_Init > SdfValueTypeNames
SdfValueTypeName Color3hArray
Definition: types.h:550
SdfValueTypeName Bool
Definition: types.h:517
SdfValueTypeName Normal3dArray
Definition: types.h:549
VT_API size_t GetHash() const
Return a hash code for the held object by calling VtHashValue() on it.
SDF_API ~Sdf_ValueTypeNamesType()
SdfValueTypeName Int64Array
Definition: types.h:540
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
SdfValueTypeName Color4hArray
Definition: types.h:551
SdfValueTypeName Vector3d
Definition: types.h:526
SdfValueTypeName Half4Array
Definition: types.h:544
SdfSpecType
Definition: types.h:68
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:255
TfToken GetSerializationName(const SdfValueTypeName &) const
SDF_API double SdfConvertUnit(const TfEnum &fromUnit, const TfEnum &toUnit)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
bool operator!=(SdfHumanReadableValue const &other) const
Definition: types.h:612
GA_API const UT_StringHolder N
SdfValueTypeName Int2
Definition: types.h:521
bool operator!=(const SdfValueBlock &block) const
Definition: types.h:593
Definition: type.h:47
#define ARCH_PRAGMA_MACRO_TOO_FEW_ARGUMENTS
Definition: pragmas.h:199
SDF_API size_t hash_value(const SdfHumanReadableValue &hrval)
SdfHumanReadableValue(std::string const &text)
Definition: types.h:607
SdfValueTypeName TexCoord3hArray
Definition: types.h:556
SdfValueTypeName TexCoord3dArray
Definition: types.h:556
SdfValueTypeName Int
Definition: types.h:518
SdfValueTypeName TexCoord3f
Definition: types.h:534
#define _SDF_UNITS
Definition: types.h:217
SdfValueTypeName Point3dArray
Definition: types.h:547
SDF_API bool SdfValueHasValidType(VtValue const &value)
Given a value, returns if there is a valid corresponding valueType.
SdfValueTypeName Half3Array
Definition: types.h:544
#define SDF_DECLARE_VALUE_TYPE_TRAITS(unused, elem)
Definition: types.h:380
SdfValueTypeName Half4
Definition: types.h:522
SdfValueTypeName QuathArray
Definition: types.h:552
std::map< double, VtValue > SdfTimeSampleMap
A map from sample times to sample values.
Definition: types.h:277
SdfValueTypeName Double2
Definition: types.h:524
#define _SDF_FOR_EACH_UNITS(macro, args)
Definition: types.h:243
SdfValueTypeName Group
Definition: types.h:536
std::vector< SdfRelocate > SdfRelocates
A vector of relocation source path to target path pairs.
Definition: types.h:274
SdfValueTypeName Int64
Definition: types.h:518
static const bool IsValueType
Definition: types.h:370
SdfValueTypeName AssetArray
Definition: types.h:542
SDF_API const std::string & SdfUnitCategory(const TfEnum &unit)
Gets the unit category for a given /a unit.
static SDF_API const Sdf_ValueTypeNamesType * New()
Definition: value.h:146
SdfValueTypeName Vector3f
Definition: types.h:526
SdfValueTypeName BoolArray
Definition: types.h:539
SdfValueTypeName Float3Array
Definition: types.h:545
#define SDF_VALUE_TYPES
Definition: types.h:362
SdfValueTypeName Double4Array
Definition: types.h:546
SDF_API const std::string & SdfGetNameForUnit(const TfEnum &unit)
Gets the name for a given /a unit.
#define _SDF_DECLARE_UNIT_ENUM(elem)
Definition: types.h:234
SdfValueTypeName TexCoord3h
Definition: types.h:534
SdfValueTypeName Quatd
Definition: types.h:530
std::pair< SdfPath, SdfPath > SdfRelocate
Definition: types.h:271
bool operator==(const SdfValueBlock &block) const
Definition: types.h:592
SDF_API bool operator!=(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are not equal.
SdfValueTypeName TexCoord2d
Definition: types.h:533
SdfPermission
Definition: types.h:132
friend size_t hash_value(const SdfUnregisteredValue &uv)
Hash.
Definition: types.h:496
SDF_API SdfUnregisteredValue()
Wraps an empty VtValue.