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