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 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 
27 /// \file sdf/types.h
28 /// Basic Sdf data types
29 
30 #include "pxr/pxr.h"
31 #include "pxr/usd/sdf/api.h"
32 #include "pxr/usd/sdf/assetPath.h"
34 #include "pxr/usd/sdf/listOp.h"
36 #include "pxr/usd/sdf/timeCode.h"
38 
39 #include "pxr/base/arch/demangle.h"
40 #include "pxr/base/arch/inttypes.h"
41 #include "pxr/base/gf/half.h"
42 #include "pxr/base/gf/matrix2d.h"
43 #include "pxr/base/gf/matrix3d.h"
44 #include "pxr/base/gf/matrix4d.h"
45 #include "pxr/base/gf/quatd.h"
46 #include "pxr/base/gf/quatf.h"
47 #include "pxr/base/gf/quath.h"
48 #include "pxr/base/gf/vec2d.h"
49 #include "pxr/base/gf/vec2f.h"
50 #include "pxr/base/gf/vec2h.h"
51 #include "pxr/base/gf/vec2i.h"
52 #include "pxr/base/gf/vec3d.h"
53 #include "pxr/base/gf/vec3f.h"
54 #include "pxr/base/gf/vec3h.h"
55 #include "pxr/base/gf/vec3i.h"
56 #include "pxr/base/gf/vec4d.h"
57 #include "pxr/base/gf/vec4f.h"
58 #include "pxr/base/gf/vec4h.h"
59 #include "pxr/base/gf/vec4i.h"
60 #include "pxr/base/tf/enum.h"
63 #include "pxr/base/tf/token.h"
64 #include "pxr/base/tf/type.h"
65 #include "pxr/base/vt/array.h"
66 #include "pxr/base/vt/dictionary.h"
67 #include "pxr/base/vt/value.h"
68 
69 #include <hboost/preprocessor/list/for_each.hpp>
70 #include <hboost/preprocessor/list/size.hpp>
71 #include <hboost/preprocessor/punctuation/comma.hpp>
72 #include <hboost/preprocessor/selection/max.hpp>
73 #include <hboost/preprocessor/seq/for_each.hpp>
74 #include <hboost/preprocessor/seq/seq.hpp>
75 #include <hboost/preprocessor/tuple/elem.hpp>
76 #include <iosfwd>
77 #include <list>
78 #include <map>
79 #include <stdint.h>
80 #include <string>
81 #include <typeinfo>
82 #include <vector>
83 
85 
86 class SdfPath;
87 
88 /// An enum that specifies the type of an object. Objects
89 /// are entities that have fields and are addressable by path.
91  // The unknown type has a value of 0 so that SdfSpecType() is unknown.
93 
94  // Real concrete types
106 
108 };
109 
110 /// An enum that identifies the possible specifiers for an
111 /// SdfPrimSpec. The SdfSpecifier enum is registered as a TfEnum
112 /// for converting to and from <c>std::string</c>.
113 ///
114 /// <b>SdfSpecifier:</b>
115 /// <ul>
116 /// <li><b>SdfSpecifierDef.</b> Defines a concrete prim.
117 /// <li><b>SdfSpecifierOver.</b> Overrides an existing prim.
118 /// <li><b>SdfSpecifierClass.</b> Defines an abstract prim.
119 /// <li><b>SdfNumSpecifiers.</b> The number of specifiers.
120 /// </ul>
121 ///
127 };
128 
129 /// Returns true if the specifier defines a prim.
130 inline
131 bool
133 {
134  return (spec != SdfSpecifierOver);
135 }
136 
137 /// An enum that defines permission levels.
138 ///
139 /// Permissions control which layers may refer to or express
140 /// opinions about a prim. Opinions expressed about a prim, or
141 /// relationships to that prim, by layers that are not allowed
142 /// permission to access the prim will be ignored.
143 ///
144 /// <b>SdfPermission:</b>
145 /// <ul>
146 /// <li><b>SdfPermissionPublic.</b> Public prims can be referred to by
147 /// anything. (Available to any client.)
148 /// <li><b>SdfPermissionPrivate.</b> Private prims can be referred to
149 /// only within the local layer stack, and not across references
150 /// or inherits. (Not available to clients.)
151 /// <li><b>SdfNumPermission.</b> Internal sentinel value.
152 /// </ul>
153 ///
157 
159 };
160 
161 /// An enum that identifies variability types for attributes.
162 /// Variability indicates whether the attribute may vary over time and
163 /// value coordinates, and if its value comes through authoring or
164 /// or from its owner.
165 ///
166 /// <b>SdfVariability:</b>
167 /// <ul>
168 /// <li><b>SdfVariabilityVarying.</b> Varying attributes may be directly
169 /// authored, animated and affected on by Actions. They are the
170 /// most flexible.
171 /// <li><b>SdfVariabilityUniform.</b> Uniform attributes may be authored
172 /// only with non-animated values (default values). They cannot
173 /// be affected by Actions, but they can be connected to other
174 /// Uniform attributes.
175 /// <li><b>SdNumVariabilities.</b> Internal sentinel value.
176 /// </ul>
177 ///
181 
183 };
184 
185 
186 /// An enum for TfError codes related to authoring operations.
187 ///
188 /// <b>SdfAuthoringError:</b>
189 /// <ul>
190 /// <li><b>SdfAuthoringErrorUnrecognizedFields.</b> This error is raised if
191 /// SdfLayer::TransferContent, or SdfLayer::SetField API is called
192 /// for layers of differing schema, and fields from the source layer
193 /// are not recognized by the target layer's schema.
194 /// <li><b>SdfAuthoringErrorUnrecognizedSpecType.</b> This error is raised
195 /// in attempts to create specs on layers with spec types that are
196 /// not recognized by the layer's schema.
197 /// </ul>
198 ///
200 {
203 };
204 
205 // Each category of compatible units of measurement is defined by a
206 // preprocessor sequence of tuples. Each such sequence gives rise to an enum
207 // representing the corresponding unit category. All the unit categories are
208 // listed in _SDF_UNITS where each entry is a two-tuple with the unit category
209 // name as the first element, and the second element is the units in that
210 // category. Each tuple in a unit category sequence corresponds to a unit of
211 // measurement represented by an enumerant whose name is given by concatenating
212 // 'Sdf', the unit category name, the word 'Unit' and the first entry in the
213 // tuple. (E.g. units of category 'Length' are represented by an enum named
214 // SdfLengthUnit with enumerants SdfLengthUnitInch, SdfLengthUnitMeter and so
215 // forth.) The second element in the tuple is the display name for the unit,
216 // and the third element is the relative size of the unit compared to the menv
217 // default unit for the unit category (which has a relative size of 1.0).
218 // Dimensionless quantities use a special 'Dimensionless' unit category
219 // represented by the enum SdfDimensionlessUnit.
220 #define _SDF_LENGTH_UNITS \
221 ((Millimeter, "mm", 0.001)) \
222 ((Centimeter, "cm", 0.01)) \
223 ((Decimeter, "dm", 0.1)) \
224 ((Meter, "m", 1.0)) \
225 ((Kilometer, "km", 1000.0)) \
226 ((Inch, "in", 0.0254)) \
227 ((Foot, "ft", 0.3048)) \
228 ((Yard, "yd", 0.9144)) \
229 ((Mile, "mi", 1609.344))
230 
231 #define _SDF_ANGULAR_UNITS \
232 ((Degrees, "deg", 1.0)) \
233 ((Radians, "rad", 57.2957795130823208768))
234 
235 #define _SDF_DIMENSIONLESS_UNITS \
236 ((Percent, "%", 0.01)) \
237 ((Default, "default", 1.0))
238 
239 #define _SDF_UNITS \
240 ((Length, _SDF_LENGTH_UNITS), \
241 ((Angular, _SDF_ANGULAR_UNITS), \
242 ((Dimensionless, _SDF_DIMENSIONLESS_UNITS), \
243  HBOOST_PP_NIL)))
244 
245 #define _SDF_UNIT_TAG(tup) HBOOST_PP_TUPLE_ELEM(3, 0, tup)
246 #define _SDF_UNIT_NAME(tup) HBOOST_PP_TUPLE_ELEM(3, 1, tup)
247 #define _SDF_UNIT_SCALE(tup) HBOOST_PP_TUPLE_ELEM(3, 2, tup)
248 
249 #define _SDF_UNITSLIST_CATEGORY(tup) HBOOST_PP_TUPLE_ELEM(2, 0, tup)
250 #define _SDF_UNITSLIST_TUPLES(tup) HBOOST_PP_TUPLE_ELEM(2, 1, tup)
251 #define _SDF_UNITSLIST_ENUM(elem) HBOOST_PP_CAT(HBOOST_PP_CAT(Sdf, \
252  _SDF_UNITSLIST_CATEGORY(elem)), Unit)
253 
254 #define _SDF_DECLARE_UNIT_ENUMERANT(r, tag, elem) \
255  HBOOST_PP_CAT(Sdf ## tag ## Unit, _SDF_UNIT_TAG(elem)),
256 
257 #define _SDF_DECLARE_UNIT_ENUM(r, unused, elem) \
258 enum _SDF_UNITSLIST_ENUM(elem) { \
259  HBOOST_PP_SEQ_FOR_EACH(_SDF_DECLARE_UNIT_ENUMERANT, \
260  _SDF_UNITSLIST_CATEGORY(elem), \
261  _SDF_UNITSLIST_TUPLES(elem)) \
262 };
263 HBOOST_PP_LIST_FOR_EACH(_SDF_DECLARE_UNIT_ENUM, ~, _SDF_UNITS)
264 
265 // Compute the max number of enumerants over all unit enums
266 #define _SDF_MAX_UNITS_OP(d, state, list) \
267  HBOOST_PP_MAX_D(d, state, HBOOST_PP_SEQ_SIZE(_SDF_UNITSLIST_TUPLES(list)))
268 #define _SDF_UNIT_MAX_UNITS \
269  HBOOST_PP_LIST_FOLD_LEFT(_SDF_MAX_UNITS_OP, 0, _SDF_UNITS)
270 
271 // Compute the number of unit enums
272 #define _SDF_UNIT_NUM_TYPES HBOOST_PP_LIST_SIZE(_SDF_UNITS)
273 
274 // Compute the number of bits needed to hold _SDF_UNIT_MAX_UNITS and
275 // _SDF_UNIT_NUM_TYPES.
276 #define _SDF_UNIT_MAX_UNITS_BITS TF_BITS_FOR_VALUES(_SDF_UNIT_MAX_UNITS)
277 #define _SDF_UNIT_TYPES_BITS TF_BITS_FOR_VALUES(_SDF_UNIT_NUM_TYPES)
278 
279 /// A map of mapper parameter names to parameter values.
280 typedef std::map<std::string, VtValue> SdfMapperParametersMap;
281 
282 /// A map of reference variant set names to variants in those sets.
283 typedef std::map<std::string, std::string> SdfVariantSelectionMap;
284 
285 /// A map of variant set names to list of variants in those sets.
286 typedef std::map<std::string, std::vector<std::string> > SdfVariantsMap;
287 
288 /// A map of source SdfPaths to target SdfPaths for relocation.
289 // Note: This map needs to be lexicographically sorted for some downstream
290 // clients, so SdfPath::FastLessThan is explicitly omitted as
291 // the Compare template parameter.
292 typedef std::map<SdfPath, SdfPath> SdfRelocatesMap;
293 
294 /// A map from sample times to sample values.
295 typedef std::map<double, VtValue> SdfTimeSampleMap;
296 
297 /// Gets the show default unit for the given /a typeName.
298 SDF_API TfEnum SdfDefaultUnit( TfToken const &typeName );
299 
300 /// Gets the show default unit for the given /a unit.
301 SDF_API const TfEnum &SdfDefaultUnit( const TfEnum &unit );
302 
303 /// Gets the unit category for a given /a unit.
305 
306 /// Converts from one unit of measure to another. The \a fromUnit and \a toUnit
307 /// units must be of the same type (for example, both of type SdfLengthUnit).
308 SDF_API double SdfConvertUnit( const TfEnum &fromUnit, const TfEnum &toUnit );
309 
310 /// Gets the name for a given /a unit.
312 
313 /// Gets a unit for the given /a name
315 
316 /// Given a value, returns if there is a valid corresponding valueType.
318 
319 /// Given an sdf valueType name, produce TfType if the type name specifies a
320 /// valid sdf value type.
322 
323 /// Given a value, produce the sdf valueType name. If you provide a value that
324 /// does not return true for SdfValueHasValidType, the return value is
325 /// unspecified.
327 
328 /// Return role name for \p typeName. Return empty token if \p typeName has no
329 /// associated role name.
331 
332 // Sdf allows a specific set of types for attribute and metadata values.
333 // These types and some additional metadata are listed in the preprocessor
334 // sequence of tuples below. First element is a tag name that is appended to
335 // 'SdfValueType' to produce the C++ traits type for the value type.
336 // Second element is the value type name, third element is the corresponding
337 // C++ type, and the fourth element is the tuple of tuple dimensions.
338 //
339 // Libraries may extend this list and define additional value types.
340 // When doing so, the type must be declared using the SDF_DECLARE_VALUE_TYPE
341 // macro below. The type must also be registered in the associated schema using
342 // SdfSchema::_RegisterValueType(s).
343 #define _SDF_SCALAR_VALUE_TYPES \
344  ((Bool, bool, bool, () )) \
345  ((UChar, uchar, unsigned char, () )) \
346  ((Int, int, int, () )) \
347  ((UInt, uint, unsigned int, () )) \
348  ((Int64, int64, int64_t, () )) \
349  ((UInt64, uint64, uint64_t, () )) \
350  ((Half, half, GfHalf, () )) \
351  ((Float, float, float, () )) \
352  ((Double, double, double, () )) \
353  ((TimeCode, timecode, SdfTimeCode, () )) \
354  ((String, string, std::string, () )) \
355  ((Token, token, TfToken, () )) \
356  ((Asset, asset, SdfAssetPath, () )) \
357  ((Opaque, opaque, SdfOpaqueValue, () ))
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) HBOOST_PP_TUPLE_ELEM(4, 2, tup)
383 #define SDF_VALUE_CPP_ARRAY_TYPE(tup) VtArray<HBOOST_PP_TUPLE_ELEM(4, 2, tup)>
384 
385 template <class T>
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.
392 template <int N>
393 struct SdfValueTypeTraits<char[N]> {
394  static const bool IsValueType = true;
395 };
396 
397 #define SDF_DECLARE_VALUE_TYPE_TRAITS(r, unused, elem) \
398 template <> \
399 struct SdfValueTypeTraits<SDF_VALUE_CPP_TYPE(elem)> { \
400  static const bool IsValueType = true; \
401 }; \
402 template <> \
403 struct SdfValueTypeTraits<SDF_VALUE_CPP_ARRAY_TYPE(elem)> { \
404  static const bool IsValueType = true; \
405 };
406 
408 
409 /// Convert \p dict to a valid metadata dictionary for scene description. Valid
410 /// metadata dictionaries have values that are any of SDF_VALUE_TYPES (or
411 /// VtArrays of those), plus VtDictionary with values of those types (or
412 /// similarly nested VtDictionaries).
413 ///
414 /// Certain conversions are performed in an attempt to produce a valid metadata
415 /// dictionary. For example:
416 ///
417 /// Convert std::vector<VtValue> to VtArray<T> where T is the type of the first
418 /// element in the vector. Fail conversion for empty vectors where a concrete
419 /// type cannot be inferred.
420 ///
421 /// Convert python sequences to VtArray<T> where T is the type of the first
422 /// element in the python sequence, when converted to VtValue, if that T is an
423 /// SDF_VALUE_TYPE). Fail conversion for empty sequences where a concrete type
424 /// cannot be inferred.
425 ///
426 /// If any values cannot be converted to valid SDF_VALUE_TYPES, omit those
427 /// elements and add a message to \p errMsg indicating which values were
428 /// omitted.
429 ///
430 SDF_API
431 bool
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 
448 
450 
458 
459 typedef std::map<std::string, SdfVariantSetSpecHandle>
461 
462 /// Writes the string representation of \c SdfSpecifier to \a out.
463 SDF_API
464 std::ostream & operator<<( std::ostream &out, const SdfSpecifier &spec );
465 
466 /// Writes the string representation of \c SdfRelocatesMap to \a out.
467 SDF_API
468 std::ostream & operator<<( std::ostream &out,
469  const SdfRelocatesMap &reloMap );
470 
471 /// Writes the string representation of \c SdfTimeSampleMap to \a out.
472 SDF_API
473 std::ostream & operator<<( std::ostream &out,
474  const SdfTimeSampleMap &sampleMap );
475 
476 SDF_API
477 std::ostream &VtStreamOut(const SdfVariantSelectionMap &, std::ostream &);
478 
479 /// \class SdfUnregisteredValue
480 /// Stores a representation of the value for an unregistered metadata
481 /// field encountered during text layer parsing.
482 ///
483 /// This provides the ability to serialize this data to a layer, as
484 /// well as limited inspection and editing capabilities (e.g., moving
485 /// this data to a different spec or field) even when the data type
486 /// of the value isn't known.
488 {
489 public:
490  /// Wraps an empty VtValue
492 
493  /// Wraps a std::string
495 
496  /// Wraps a VtDictionary
497  SDF_API explicit SdfUnregisteredValue(const VtDictionary &value);
498 
499  /// Wraps a SdfUnregisteredValueListOp
501 
502  /// Returns the wrapped VtValue specified in the constructor
503  const VtValue& GetValue() const {
504  return _value;
505  }
506 
507  /// Hash.
508  friend size_t hash_value(const SdfUnregisteredValue &uv) {
509  return uv._value.GetHash();
510  }
511 
512  /// Returns true if the wrapped VtValues are equal
513  SDF_API bool operator==(const SdfUnregisteredValue &other) const;
514 
515  /// Returns true if the wrapped VtValues are not equal
516  SDF_API bool operator!=(const SdfUnregisteredValue &other) const;
517 
518 private:
519  VtValue _value;
520 };
521 
522 /// Writes the string representation of \c SdfUnregisteredValue to \a out.
523 SDF_API std::ostream &operator << (std::ostream &out, const SdfUnregisteredValue &value);
524 
527  Sdf_ValueTypeNamesType& operator=(const Sdf_ValueTypeNamesType&) = delete;
528 public:
549 
568 
570  struct _Init {
571  SDF_API static const Sdf_ValueTypeNamesType* New();
572  };
573 
574  // For Pixar internal backwards compatibility.
576  TfToken GetSerializationName(const VtValue&) const;
577  TfToken GetSerializationName(const TfToken&) const;
578 
579 private:
582 };
583 
586 
587 /// \class SdfValueBlock
588 /// A special value type that can be used to explicitly author an
589 /// opinion for an attribute's default value or time sample value
590 /// that represents having no value. Note that this is different
591 /// from not having a value authored.
592 ///
593 /// One could author such a value in two ways.
594 ///
595 /// \code
596 /// attribute->SetDefaultValue(VtValue(SdfValueBlock());
597 /// ...
598 /// layer->SetTimeSample(attribute->GetPath(), 101, VtValue(SdfValueBlock()));
599 /// \endcode
600 ///
601 struct SdfValueBlock {
602  bool operator==(const SdfValueBlock& block) const { return true; }
603  bool operator!=(const SdfValueBlock& block) const { return false; }
604 
605 private:
606  friend inline size_t hash_value(const SdfValueBlock &block) { return 0; }
607 };
608 
609 // Write out the string representation of a block.
610 SDF_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.
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; }
627 private:
628  std::string _text;
629 };
630 
631 SDF_API
632 std::ostream &operator<<(std::ostream &out, const SdfHumanReadableValue &hrval);
633 
634 SDF_API
635 size_t hash_value(const SdfHumanReadableValue &hrval);
636 
638 
639 #endif // PXR_USD_SDF_TYPES_H
SdfValueTypeName Normal3d
Definition: types.h:539
SDF_API TfType SdfGetTypeForValueTypeName(TfToken const &name)
SdfValueTypeName Float2Array
Definition: types.h:556
Definition: layer.h:94
SdfValueTypeName Color4dArray
Definition: types.h:562
SdfValueTypeName IntArray
Definition: types.h:551
SdfValueTypeName Color3fArray
Definition: types.h:561
SdfValueTypeName Double4
Definition: types.h:536
SdfValueTypeName Token
Definition: types.h:532
SdfValueTypeName QuatdArray
Definition: types.h:563
SdfValueTypeName UCharArray
Definition: types.h:551
friend size_t hash_value(const SdfValueBlock &block)
Definition: types.h:606
SdfValueTypeName TexCoord2fArray
Definition: types.h:566
SdfValueTypeName Half
Definition: types.h:531
SdfValueTypeName Asset
Definition: types.h:532
SdfValueTypeName HalfArray
Definition: types.h:552
SdfValueTypeName QuatfArray
Definition: types.h:563
SdfValueTypeName Matrix2dArray
Definition: types.h:564
SdfValueTypeName Color4f
Definition: types.h:541
SDF_API TfToken SdfGetRoleNameForValueTypeName(TfToken const &typeName)
SdfValueTypeName Int4
Definition: types.h:533
std::map< SdfPath, SdfPath > SdfRelocatesMap
A map of source SdfPaths to target SdfPaths for relocation.
Definition: types.h:292
SdfValueTypeName Point3h
Definition: types.h:537
SdfValueTypeName DoubleArray
Definition: types.h:552
GA_API const UT_StringHolder uv
SdfValueTypeName Int4Array
Definition: types.h:554
SdfValueTypeName Frame4dArray
Definition: types.h:565
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:286
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
SdfValueTypeName TokenArray
Definition: types.h:553
SdfValueTypeName Normal3hArray
Definition: types.h:560
SdfValueTypeName TexCoord3fArray
Definition: types.h:567
SdfValueTypeName Vector3hArray
Definition: types.h:559
#define SDF_DECLARE_VALUE_TYPE_TRAITS(r, unused, elem)
Definition: types.h:397
SdfValueTypeName Vector3fArray
Definition: types.h:559
std::map< std::string, std::string > SdfVariantSelectionMap
A map of reference variant set names to variants in those sets.
Definition: types.h:283
Definition: spec.h:49
SdfValueTypeName Color4fArray
Definition: types.h:562
SdfValueTypeName UInt64
Definition: types.h:530
friend const Sdf_ValueTypeNamesType * Sdf_InitializeValueTypeNames()
SdfValueTypeName UChar
Definition: types.h:530
SdfValueTypeName Half2
Definition: types.h:534
Definition: enum.h:137
SdfValueTypeName Normal3f
Definition: types.h:539
SdfValueTypeName Int3
Definition: types.h:533
#define SDF_VALUE_ROLE_NAME_TOKENS
Definition: types.h:434
SDF_API const TfEnum & SdfGetUnitFromName(const std::string &name)
Gets a unit for the given /a name.
SdfValueTypeName TexCoord3d
Definition: types.h:546
SdfValueTypeName TexCoord2hArray
Definition: types.h:566
SdfHumanReadableValue()=default
std::map< std::string, VtValue > SdfMapperParametersMap
A map of mapper parameter names to parameter values.
Definition: types.h:280
SdfValueTypeName Point3hArray
Definition: types.h:558
SdfValueTypeName Half2Array
Definition: types.h:555
HBOOST_PP_SEQ_FOR_EACH(SDF_DECLARE_VALUE_TYPE_TRAITS,~, SDF_VALUE_TYPES)
SdfValueTypeName TimeCode
Definition: types.h:531
TF_DECLARE_PUBLIC_TOKENS(SdfValueRoleNames, SDF_API, SDF_VALUE_ROLE_NAME_TOKENS)
SdfValueTypeName TexCoord2h
Definition: types.h:545
HDX_API std::ostream & operator<<(std::ostream &out, const HdxShaderInputs &pv)
SdfValueTypeName Vector3h
Definition: types.h:538
class SdfListOp< class SdfUnregisteredValue > SdfUnregisteredValueListOp
Definition: listOp.h:333
SdfValueTypeName Normal3fArray
Definition: types.h:560
SdfValueTypeName Matrix4dArray
Definition: types.h:564
SdfValueTypeName Vector3dArray
Definition: types.h:559
SdfValueTypeName Point3fArray
Definition: types.h:558
SdfValueTypeName Int3Array
Definition: types.h:554
SdfValueTypeName FloatArray
Definition: types.h:552
SdfValueTypeName Double
Definition: types.h:531
SdfValueTypeName Half3
Definition: types.h:534
SdfValueTypeName Frame4d
Definition: types.h:544
SdfValueTypeName Normal3h
Definition: types.h:539
SdfValueTypeName StringArray
Definition: types.h:553
SdfValueTypeName TexCoord2f
Definition: types.h:545
SdfValueTypeName Quath
Definition: types.h:542
SdfValueTypeName Color4d
Definition: types.h:541
SDF_API bool SdfConvertToValidMetadataDictionary(VtDictionary *dict, std::string *errMsg)
SdfValueTypeName Opaque
Definition: types.h:547
SDF_API SdfValueTypeName SdfGetValueTypeNameForValue(VtValue const &value)
Definition: token.h:87
SdfValueTypeName Double2Array
Definition: types.h:557
SdfValueTypeName Color3h
Definition: types.h:540
SdfValueTypeName Int2Array
Definition: types.h:554
SdfValueTypeName Matrix3d
Definition: types.h:543
SdfValueTypeName Float
Definition: types.h:531
bool SdfIsDefiningSpecifier(SdfSpecifier spec)
Returns true if the specifier defines a prim.
Definition: types.h:132
SDF_API TfEnum SdfDefaultUnit(TfToken const &typeName)
Gets the show default unit for the given /a typeName.
SdfValueTypeName UIntArray
Definition: types.h:551
SdfValueTypeName Float4Array
Definition: types.h:556
SdfValueTypeName TexCoord2dArray
Definition: types.h:566
SdfValueTypeName Color3f
Definition: types.h:540
SdfValueTypeName Color3d
Definition: types.h:540
SdfValueTypeName Float2
Definition: types.h:535
SDF_API std::ostream & VtStreamOut(const SdfVariantSelectionMap &, std::ostream &)
std::map< std::string, SdfVariantSetSpecHandle > SdfVariantSetSpecHandleMap
Definition: types.h:460
SdfValueTypeName Matrix2d
Definition: types.h:543
SdfSpecifier
Definition: types.h:122
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
SdfValueTypeName Float3
Definition: types.h:535
SDF_DECLARE_HANDLES(SdfLayer)
SdfValueTypeName Color4h
Definition: types.h:541
GLuint const GLchar * name
Definition: glcorearb.h:786
const VtValue & GetValue() const
Returns the wrapped VtValue specified in the constructor.
Definition: types.h:503
std::string const & GetText() const
Definition: types.h:626
SDF_API bool operator==(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are equal.
Definition: path.h:291
SdfValueTypeName Quatf
Definition: types.h:542
SdfAuthoringError
Definition: types.h:199
SdfValueTypeName TimeCodeArray
Definition: types.h:552
SdfValueTypeName Point3f
Definition: types.h:537
SdfValueTypeName Double3
Definition: types.h:536
SdfValueTypeName UInt
Definition: types.h:530
SdfValueTypeName Double3Array
Definition: types.h:557
SdfValueTypeName String
Definition: types.h:532
SdfValueTypeName Float4
Definition: types.h:535
SdfValueTypeName UInt64Array
Definition: types.h:551
bool operator==(SdfHumanReadableValue const &other) const
Definition: types.h:619
SdfValueTypeName Matrix4d
Definition: types.h:543
SdfVariability
Definition: types.h:178
SdfValueTypeName Matrix3dArray
Definition: types.h:564
#define SDF_API
Definition: api.h:40
SdfValueTypeName Color3dArray
Definition: types.h:561
SdfValueTypeName Point3d
Definition: types.h:537
SDF_API TfStaticData< const Sdf_ValueTypeNamesType, Sdf_ValueTypeNamesType::_Init > SdfValueTypeNames
SdfValueTypeName Color3hArray
Definition: types.h:561
SdfValueTypeName Bool
Definition: types.h:529
SdfValueTypeName Normal3dArray
Definition: types.h:560
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:551
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
SdfValueTypeName Color4hArray
Definition: types.h:562
SdfValueTypeName Vector3d
Definition: types.h:538
SdfValueTypeName Half4Array
Definition: types.h:555
SdfSpecType
Definition: types.h:90
TfToken GetSerializationName(const SdfValueTypeName &) const
SDF_API double SdfConvertUnit(const TfEnum &fromUnit, const TfEnum &toUnit)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
bool operator!=(SdfHumanReadableValue const &other) const
Definition: types.h:622
GA_API const UT_StringHolder N
SdfValueTypeName Int2
Definition: types.h:533
bool operator!=(const SdfValueBlock &block) const
Definition: types.h:603
Definition: type.h:64
SDF_API size_t hash_value(const SdfHumanReadableValue &hrval)
SdfHumanReadableValue(std::string const &text)
Definition: types.h:617
SdfValueTypeName TexCoord3hArray
Definition: types.h:567
SdfValueTypeName TexCoord3dArray
Definition: types.h:567
SdfValueTypeName Int
Definition: types.h:530
SdfValueTypeName TexCoord3f
Definition: types.h:546
#define _SDF_UNITS
Definition: types.h:239
Definition: core.h:1131
SdfValueTypeName Point3dArray
Definition: types.h:558
SDF_API bool SdfValueHasValidType(VtValue const &value)
Given a value, returns if there is a valid corresponding valueType.
SdfValueTypeName Half3Array
Definition: types.h:555
SdfValueTypeName Half4
Definition: types.h:534
SdfValueTypeName QuathArray
Definition: types.h:563
std::map< double, VtValue > SdfTimeSampleMap
A map from sample times to sample values.
Definition: types.h:295
SdfValueTypeName Double2
Definition: types.h:536
SdfValueTypeName Group
Definition: types.h:548
#define _SDF_DECLARE_UNIT_ENUM(r, unused, elem)
Definition: types.h:257
SdfValueTypeName Int64
Definition: types.h:530
static const bool IsValueType
Definition: types.h:387
SdfValueTypeName AssetArray
Definition: types.h:553
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:167
SdfValueTypeName Vector3f
Definition: types.h:538
SdfValueTypeName BoolArray
Definition: types.h:550
SdfValueTypeName Float3Array
Definition: types.h:556
#define SDF_VALUE_TYPES
Definition: types.h:379
SdfValueTypeName Double4Array
Definition: types.h:557
SDF_API const std::string & SdfGetNameForUnit(const TfEnum &unit)
Gets the name for a given /a unit.
SdfValueTypeName TexCoord3h
Definition: types.h:546
SdfValueTypeName Quatd
Definition: types.h:542
bool operator==(const SdfValueBlock &block) const
Definition: types.h:602
SDF_API bool operator!=(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are not equal.
SdfValueTypeName TexCoord2d
Definition: types.h:545
SdfPermission
Definition: types.h:154
friend size_t hash_value(const SdfUnregisteredValue &uv)
Hash.
Definition: types.h:508
SDF_API SdfUnregisteredValue()
Wraps an empty VtValue.