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"
37 #include "pxr/usd/sdf/timeCode.h"
39 
40 #include "pxr/base/arch/demangle.h"
41 #include "pxr/base/arch/inttypes.h"
42 #include "pxr/base/arch/pragmas.h"
43 #include "pxr/base/gf/half.h"
44 #include "pxr/base/gf/matrix2d.h"
45 #include "pxr/base/gf/matrix3d.h"
46 #include "pxr/base/gf/matrix4d.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"
65 #include "pxr/base/tf/token.h"
66 #include "pxr/base/tf/type.h"
67 #include "pxr/base/vt/array.h"
68 #include "pxr/base/vt/dictionary.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 
80 
81 class SdfPath;
82 
83 /// An enum that specifies the type of an object. Objects
84 /// are entities that have fields and are addressable by path.
86  // The unknown type has a value of 0 so that SdfSpecType() is unknown.
88 
89  // Real concrete types
101 
103 };
104 
105 /// An enum that identifies the possible specifiers for an
106 /// SdfPrimSpec. The SdfSpecifier enum is registered as a TfEnum
107 /// for converting to and from <c>std::string</c>.
108 ///
109 /// <b>SdfSpecifier:</b>
110 /// <ul>
111 /// <li><b>SdfSpecifierDef.</b> Defines a concrete prim.
112 /// <li><b>SdfSpecifierOver.</b> Overrides an existing prim.
113 /// <li><b>SdfSpecifierClass.</b> Defines an abstract prim.
114 /// <li><b>SdfNumSpecifiers.</b> The number of specifiers.
115 /// </ul>
116 ///
122 };
123 
124 /// Returns true if the specifier defines a prim.
125 inline
126 bool
128 {
129  return (spec != SdfSpecifierOver);
130 }
131 
132 /// An enum that defines permission levels.
133 ///
134 /// Permissions control which layers may refer to or express
135 /// opinions about a prim. Opinions expressed about a prim, or
136 /// relationships to that prim, by layers that are not allowed
137 /// permission to access the prim will be ignored.
138 ///
139 /// <b>SdfPermission:</b>
140 /// <ul>
141 /// <li><b>SdfPermissionPublic.</b> Public prims can be referred to by
142 /// anything. (Available to any client.)
143 /// <li><b>SdfPermissionPrivate.</b> Private prims can be referred to
144 /// only within the local layer stack, and not across references
145 /// or inherits. (Not available to clients.)
146 /// <li><b>SdfNumPermission.</b> Internal sentinel value.
147 /// </ul>
148 ///
152 
154 };
155 
156 /// An enum that identifies variability types for attributes.
157 /// Variability indicates whether the attribute may vary over time and
158 /// value coordinates, and if its value comes through authoring or
159 /// or from its owner.
160 ///
161 /// <b>SdfVariability:</b>
162 /// <ul>
163 /// <li><b>SdfVariabilityVarying.</b> Varying attributes may be directly
164 /// authored, animated and affected on by Actions. They are the
165 /// most flexible.
166 /// <li><b>SdfVariabilityUniform.</b> Uniform attributes may be authored
167 /// only with non-animated values (default values). They cannot
168 /// be affected by Actions, but they can be connected to other
169 /// Uniform attributes.
170 /// <li><b>SdNumVariabilities.</b> Internal sentinel value.
171 /// </ul>
172 ///
176 
178 };
179 
180 
181 /// An enum for TfError codes related to authoring operations.
182 ///
183 /// <b>SdfAuthoringError:</b>
184 /// <ul>
185 /// <li><b>SdfAuthoringErrorUnrecognizedFields.</b> This error is raised if
186 /// SdfLayer::TransferContent, or SdfLayer::SetField API is called
187 /// for layers of differing schema, and fields from the source layer
188 /// are not recognized by the target layer's schema.
189 /// <li><b>SdfAuthoringErrorUnrecognizedSpecType.</b> This error is raised
190 /// in attempts to create specs on layers with spec types that are
191 /// not recognized by the layer's schema.
192 /// </ul>
193 ///
195 {
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) \
252 enum _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.
270 
271 /// A map of mapper parameter names to parameter values.
272 typedef std::map<std::string, VtValue> SdfMapperParametersMap;
273 
274 /// A map of reference variant set names to variants in those sets.
275 typedef std::map<std::string, std::string> SdfVariantSelectionMap;
276 
277 /// A map of variant set names to list of variants in those sets.
278 typedef std::map<std::string, std::vector<std::string> > SdfVariantsMap;
279 
280 /// A map of source SdfPaths to target SdfPaths for relocation.
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.
284 typedef std::map<SdfPath, SdfPath> SdfRelocatesMap;
285 
286 /// A map from sample times to sample values.
287 typedef std::map<double, VtValue> SdfTimeSampleMap;
288 
289 /// Gets the show default unit for the given /a typeName.
290 SDF_API TfEnum SdfDefaultUnit( TfToken const &typeName );
291 
292 /// Gets the show default unit for the given /a unit.
293 SDF_API const TfEnum &SdfDefaultUnit( const TfEnum &unit );
294 
295 /// Gets the unit category for a given /a unit.
296 SDF_API const std::string &SdfUnitCategory( const TfEnum &unit );
297 
298 /// Converts from one unit of measure to another. The \a fromUnit and \a toUnit
299 /// units must be of the same type (for example, both of type SdfLengthUnit).
300 SDF_API double SdfConvertUnit( const TfEnum &fromUnit, const TfEnum &toUnit );
301 
302 /// Gets the name for a given /a unit.
303 SDF_API const std::string &SdfGetNameForUnit( const TfEnum &unit );
304 
305 /// Gets a unit for the given /a name
306 SDF_API const TfEnum &SdfGetUnitFromName( const std::string &name );
307 
308 /// Given a value, returns if there is a valid corresponding valueType.
310 
311 /// Given an sdf valueType name, produce TfType if the type name specifies a
312 /// valid sdf value type.
314 
315 /// Given a value, produce the sdf valueType name. If you provide a value that
316 /// does not return true for SdfValueHasValidType, the return value is
317 /// unspecified.
319 
320 /// Return role name for \p typeName. Return empty token if \p typeName has no
321 /// associated role name.
323 
324 // Sdf allows a specific set of types for attribute and metadata values.
325 // These types and some additional metadata are listed in the preprocessor
326 // sequence of tuples below. First element is a tag name that is appended to
327 // 'SdfValueType' to produce the C++ traits type for the value type.
328 // Second element is the value type name, third element is the corresponding
329 // C++ type, and the fourth element is the tuple of tuple dimensions.
330 //
331 // Libraries may extend this list and define additional value types.
332 // When doing so, the type must be declared using the SDF_DECLARE_VALUE_TYPE
333 // macro below. The type must also be registered in the associated schema using
334 // SdfSchema::_RegisterValueType(s).
335 #define _SDF_SCALAR_VALUE_TYPES \
336  ((Bool, bool, bool, () )) \
337  ((UChar, uchar, unsigned char, () )) \
338  ((Int, int, int, () )) \
339  ((UInt, uint, unsigned int, () )) \
340  ((Int64, int64, int64_t, () )) \
341  ((UInt64, uint64, uint64_t, () )) \
342  ((Half, half, GfHalf, () )) \
343  ((Float, float, float, () )) \
344  ((Double, double, double, () )) \
345  ((TimeCode, timecode, SdfTimeCode, () )) \
346  ((String, string, std::string, () )) \
347  ((Token, token, TfToken, () )) \
348  ((Asset, asset, SdfAssetPath, () )) \
349  ((Opaque, opaque, SdfOpaqueValue, () )) \
350  ((PathExpression, pathExpression, SdfPathExpression, () ))
351 
352 #define _SDF_DIMENSIONED_VALUE_TYPES \
353  ((Matrix2d, matrix2d, GfMatrix2d, (2,2) )) \
354  ((Matrix3d, matrix3d, GfMatrix3d, (3,3) )) \
355  ((Matrix4d, matrix4d, GfMatrix4d, (4,4) )) \
356  ((Quath, quath, GfQuath, (4) )) \
357  ((Quatf, quatf, GfQuatf, (4) )) \
358  ((Quatd, quatd, GfQuatd, (4) )) \
359  ((Int2, int2, GfVec2i, (2) )) \
360  ((Half2, half2, GfVec2h, (2) )) \
361  ((Float2, float2, GfVec2f, (2) )) \
362  ((Double2, double2, GfVec2d, (2) )) \
363  ((Int3, int3, GfVec3i, (3) )) \
364  ((Half3, half3, GfVec3h, (3) )) \
365  ((Float3, float3, GfVec3f, (3) )) \
366  ((Double3, double3, GfVec3d, (3) )) \
367  ((Int4, int4, GfVec4i, (4) )) \
368  ((Half4, half4, GfVec4h, (4) )) \
369  ((Float4, float4, GfVec4f, (4) )) \
370  ((Double4, double4, GfVec4d, (4) ))
371 
372 #define SDF_VALUE_TYPES _SDF_SCALAR_VALUE_TYPES _SDF_DIMENSIONED_VALUE_TYPES
373 
374 // Accessors for individual elements in the value types tuples.
375 #define SDF_VALUE_CPP_TYPE(tup) TF_PP_TUPLE_ELEM(2, tup)
376 #define SDF_VALUE_CPP_ARRAY_TYPE(tup) VtArray<TF_PP_TUPLE_ELEM(2, tup)>
377 
378 template <class T>
380  static const bool IsValueType = false;
381 };
382 
383 // Allow character arrays to be treated as Sdf value types.
384 // Sdf converts character arrays to strings for scene description.
385 template <int N>
386 struct SdfValueTypeTraits<char[N]> {
387  static const bool IsValueType = true;
388 };
389 
390 #define SDF_DECLARE_VALUE_TYPE_TRAITS(unused, elem) \
391 template <> \
392 struct SdfValueTypeTraits<SDF_VALUE_CPP_TYPE(elem)> { \
393  static const bool IsValueType = true; \
394 }; \
395 template <> \
396 struct SdfValueTypeTraits<SDF_VALUE_CPP_ARRAY_TYPE(elem)> { \
397  static const bool IsValueType = true; \
398 };
399 
401 
402 /// Convert \p dict to a valid metadata dictionary for scene description. Valid
403 /// metadata dictionaries have values that are any of SDF_VALUE_TYPES (or
404 /// VtArrays of those), plus VtDictionary with values of those types (or
405 /// similarly nested VtDictionaries).
406 ///
407 /// Certain conversions are performed in an attempt to produce a valid metadata
408 /// dictionary. For example:
409 ///
410 /// Convert std::vector<VtValue> to VtArray<T> where T is the type of the first
411 /// element in the vector. Fail conversion for empty vectors where a concrete
412 /// type cannot be inferred.
413 ///
414 /// Convert python sequences to VtArray<T> where T is the type of the first
415 /// element in the python sequence, when converted to VtValue, if that T is an
416 /// SDF_VALUE_TYPE). Fail conversion for empty sequences where a concrete type
417 /// cannot be inferred.
418 ///
419 /// If any values cannot be converted to valid SDF_VALUE_TYPES, omit those
420 /// elements and add a message to \p errMsg indicating which values were
421 /// omitted.
422 ///
423 SDF_API
424 bool
426 
427 #define SDF_VALUE_ROLE_NAME_TOKENS \
428  (Point) \
429  (Normal) \
430  (Vector) \
431  (Color) \
432  (Frame) \
433  (Transform) \
434  (PointIndex) \
435  (EdgeIndex) \
436  (FaceIndex) \
437  (Group) \
438  (TextureCoordinate)
439 
441 
443 
451 
452 typedef std::map<std::string, SdfVariantSetSpecHandle>
454 
455 /// Writes the string representation of \c SdfSpecifier to \a out.
456 SDF_API
457 std::ostream & operator<<( std::ostream &out, const SdfSpecifier &spec );
458 
459 /// Writes the string representation of \c SdfRelocatesMap to \a out.
460 SDF_API
461 std::ostream & operator<<( std::ostream &out,
462  const SdfRelocatesMap &reloMap );
463 
464 /// Writes the string representation of \c SdfTimeSampleMap to \a out.
465 SDF_API
466 std::ostream & operator<<( std::ostream &out,
467  const SdfTimeSampleMap &sampleMap );
468 
469 SDF_API
470 std::ostream &VtStreamOut(const SdfVariantSelectionMap &, std::ostream &);
471 
472 /// \class SdfUnregisteredValue
473 /// Stores a representation of the value for an unregistered metadata
474 /// field encountered during text layer parsing.
475 ///
476 /// This provides the ability to serialize this data to a layer, as
477 /// well as limited inspection and editing capabilities (e.g., moving
478 /// this data to a different spec or field) even when the data type
479 /// of the value isn't known.
481 {
482 public:
483  /// Wraps an empty VtValue
485 
486  /// Wraps a std::string
487  SDF_API explicit SdfUnregisteredValue(const std::string &value);
488 
489  /// Wraps a VtDictionary
490  SDF_API explicit SdfUnregisteredValue(const VtDictionary &value);
491 
492  /// Wraps a SdfUnregisteredValueListOp
494 
495  /// Returns the wrapped VtValue specified in the constructor
496  const VtValue& GetValue() const {
497  return _value;
498  }
499 
500  /// Hash.
501  friend size_t hash_value(const SdfUnregisteredValue &uv) {
502  return uv._value.GetHash();
503  }
504 
505  /// Returns true if the wrapped VtValues are equal
506  SDF_API bool operator==(const SdfUnregisteredValue &other) const;
507 
508  /// Returns true if the wrapped VtValues are not equal
509  SDF_API bool operator!=(const SdfUnregisteredValue &other) const;
510 
511 private:
512  VtValue _value;
513 };
514 
515 /// Writes the string representation of \c SdfUnregisteredValue to \a out.
516 SDF_API std::ostream &operator << (std::ostream &out, const SdfUnregisteredValue &value);
517 
520  Sdf_ValueTypeNamesType& operator=(const Sdf_ValueTypeNamesType&) = delete;
521 public:
543 
563 
565  struct _Init {
566  SDF_API static const Sdf_ValueTypeNamesType* New();
567  };
568 
569  // For Pixar internal backwards compatibility.
571  TfToken GetSerializationName(const VtValue&) const;
572  TfToken GetSerializationName(const TfToken&) const;
573 
574 private:
577 };
578 
581 
582 /// \class SdfValueBlock
583 /// A special value type that can be used to explicitly author an
584 /// opinion for an attribute's default value or time sample value
585 /// that represents having no value. Note that this is different
586 /// from not having a value authored.
587 ///
588 /// One could author such a value in two ways.
589 ///
590 /// \code
591 /// attribute->SetDefaultValue(VtValue(SdfValueBlock());
592 /// ...
593 /// layer->SetTimeSample(attribute->GetPath(), 101, VtValue(SdfValueBlock()));
594 /// \endcode
595 ///
596 struct SdfValueBlock {
597  bool operator==(const SdfValueBlock& block) const { return true; }
598  bool operator!=(const SdfValueBlock& block) const { return false; }
599 
600 private:
601  friend inline size_t hash_value(const SdfValueBlock &block) { return 0; }
602 };
603 
604 // Write out the string representation of a block.
605 SDF_API std::ostream& operator<<(std::ostream&, SdfValueBlock const&);
606 
607 // A class that represents a human-readable value. This is used for the special
608 // purpose of producing layers that serialize field values in alternate ways; to
609 // produce more human-readable output, for example.
611  SdfHumanReadableValue() = default;
612  explicit SdfHumanReadableValue(std::string const &text) : _text(text) {}
613 
614  bool operator==(SdfHumanReadableValue const &other) const {
615  return GetText() == other.GetText();
616  }
617  bool operator!=(SdfHumanReadableValue const &other) const {
618  return !(*this == other);
619  }
620 
621  std::string const &GetText() const { return _text; }
622 private:
623  std::string _text;
624 };
625 
626 SDF_API
627 std::ostream &operator<<(std::ostream &out, const SdfHumanReadableValue &hrval);
628 
629 SDF_API
630 size_t hash_value(const SdfHumanReadableValue &hrval);
631 
633 
634 #endif // PXR_USD_SDF_TYPES_H
SdfValueTypeName Normal3d
Definition: types.h:532
SDF_API TfType SdfGetTypeForValueTypeName(TfToken const &name)
SdfValueTypeName Float2Array
Definition: types.h:550
Definition: layer.h:97
SdfValueTypeName Color4dArray
Definition: types.h:556
SdfValueTypeName IntArray
Definition: types.h:545
SdfValueTypeName Color3fArray
Definition: types.h:555
SdfValueTypeName Double4
Definition: types.h:529
SdfValueTypeName Token
Definition: types.h:525
SdfValueTypeName QuatdArray
Definition: types.h:557
SdfValueTypeName UCharArray
Definition: types.h:545
friend size_t hash_value(const SdfValueBlock &block)
Definition: types.h:601
SdfValueTypeName TexCoord2fArray
Definition: types.h:560
SdfValueTypeName Half
Definition: types.h:524
SdfValueTypeName Asset
Definition: types.h:525
SdfValueTypeName HalfArray
Definition: types.h:546
SdfValueTypeName QuatfArray
Definition: types.h:557
SdfValueTypeName Matrix2dArray
Definition: types.h:558
SdfValueTypeName Color4f
Definition: types.h:534
SDF_API TfToken SdfGetRoleNameForValueTypeName(TfToken const &typeName)
SdfValueTypeName Int4
Definition: types.h:526
std::map< SdfPath, SdfPath > SdfRelocatesMap
A map of source SdfPaths to target SdfPaths for relocation.
Definition: types.h:284
SdfValueTypeName Point3h
Definition: types.h:530
SdfValueTypeName DoubleArray
Definition: types.h:546
GA_API const UT_StringHolder uv
SdfValueTypeName Int4Array
Definition: types.h:548
SdfValueTypeName Frame4dArray
Definition: types.h:559
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
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
SdfValueTypeName TokenArray
Definition: types.h:547
SdfValueTypeName Normal3hArray
Definition: types.h:554
SdfValueTypeName TexCoord3fArray
Definition: types.h:561
#define ARCH_PRAGMA_POP
Definition: pragmas.h:170
SdfValueTypeName Vector3hArray
Definition: types.h:553
SdfValueTypeName Vector3fArray
Definition: types.h:553
std::map< std::string, std::string > SdfVariantSelectionMap
A map of reference variant set names to variants in those sets.
Definition: types.h:275
Definition: spec.h:49
SdfValueTypeName Color4fArray
Definition: types.h:556
SdfValueTypeName UInt64
Definition: types.h:523
friend const Sdf_ValueTypeNamesType * Sdf_InitializeValueTypeNames()
SdfValueTypeName UChar
Definition: types.h:523
SdfValueTypeName Half2
Definition: types.h:527
Definition: enum.h:136
SdfValueTypeName Normal3f
Definition: types.h:532
SdfValueTypeName Int3
Definition: types.h:526
#define SDF_VALUE_ROLE_NAME_TOKENS
Definition: types.h:427
SDF_API const TfEnum & SdfGetUnitFromName(const std::string &name)
Gets a unit for the given /a name.
SdfValueTypeName TexCoord3d
Definition: types.h:539
SdfValueTypeName TexCoord2hArray
Definition: types.h:560
SdfHumanReadableValue()=default
SdfValueTypeName Point3hArray
Definition: types.h:552
SdfValueTypeName Half2Array
Definition: types.h:549
SdfValueTypeName TimeCode
Definition: types.h:524
TF_DECLARE_PUBLIC_TOKENS(SdfValueRoleNames, SDF_API, SDF_VALUE_ROLE_NAME_TOKENS)
SdfValueTypeName TexCoord2h
Definition: types.h:538
HDX_API std::ostream & operator<<(std::ostream &out, const HdxShaderInputs &pv)
SdfValueTypeName Vector3h
Definition: types.h:531
class SdfListOp< class SdfUnregisteredValue > SdfUnregisteredValueListOp
Definition: listOp.h:332
SdfValueTypeName Normal3fArray
Definition: types.h:554
SdfValueTypeName Matrix4dArray
Definition: types.h:558
SdfValueTypeName Vector3dArray
Definition: types.h:553
SdfValueTypeName Point3fArray
Definition: types.h:552
SdfValueTypeName Int3Array
Definition: types.h:548
SdfValueTypeName FloatArray
Definition: types.h:546
SdfValueTypeName Double
Definition: types.h:524
SdfValueTypeName Half3
Definition: types.h:527
TF_PP_SEQ_FOR_EACH(SDF_DECLARE_VALUE_TYPE_TRAITS,~, SDF_VALUE_TYPES)
SdfValueTypeName Frame4d
Definition: types.h:537
SdfValueTypeName Normal3h
Definition: types.h:532
SdfValueTypeName StringArray
Definition: types.h:547
SdfValueTypeName TexCoord2f
Definition: types.h:538
SdfValueTypeName Quath
Definition: types.h:535
SdfValueTypeName Color4d
Definition: types.h:534
SDF_API bool SdfConvertToValidMetadataDictionary(VtDictionary *dict, std::string *errMsg)
SdfValueTypeName Opaque
Definition: types.h:540
SDF_API SdfValueTypeName SdfGetValueTypeNameForValue(VtValue const &value)
Definition: token.h:87
SdfValueTypeName Double2Array
Definition: types.h:551
#define ARCH_PRAGMA_PUSH
Definition: pragmas.h:166
SdfValueTypeName Color3h
Definition: types.h:533
SdfValueTypeName Int2Array
Definition: types.h:548
SdfValueTypeName Matrix3d
Definition: types.h:536
SdfValueTypeName Float
Definition: types.h:524
bool SdfIsDefiningSpecifier(SdfSpecifier spec)
Returns true if the specifier defines a prim.
Definition: types.h:127
SDF_API TfEnum SdfDefaultUnit(TfToken const &typeName)
Gets the show default unit for the given /a typeName.
SdfValueTypeName UIntArray
Definition: types.h:545
SdfValueTypeName PathExpression
Definition: types.h:542
SdfValueTypeName Float4Array
Definition: types.h:550
SdfValueTypeName TexCoord2dArray
Definition: types.h:560
SdfValueTypeName Color3f
Definition: types.h:533
SdfValueTypeName Color3d
Definition: types.h:533
SdfValueTypeName Float2
Definition: types.h:528
SDF_API std::ostream & VtStreamOut(const SdfVariantSelectionMap &, std::ostream &)
std::map< std::string, SdfVariantSetSpecHandle > SdfVariantSetSpecHandleMap
Definition: types.h:453
SdfValueTypeName Matrix2d
Definition: types.h:536
SdfSpecifier
Definition: types.h:117
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
SdfValueTypeName Float3
Definition: types.h:528
SDF_DECLARE_HANDLES(SdfLayer)
SdfValueTypeName Color4h
Definition: types.h:534
GLuint const GLchar * name
Definition: glcorearb.h:786
const VtValue & GetValue() const
Returns the wrapped VtValue specified in the constructor.
Definition: types.h:496
SdfValueTypeName PathExpressionArray
Definition: types.h:562
std::string const & GetText() const
Definition: types.h:621
SDF_API bool operator==(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are equal.
Definition: path.h:290
SdfValueTypeName Quatf
Definition: types.h:535
SdfAuthoringError
Definition: types.h:194
SdfValueTypeName TimeCodeArray
Definition: types.h:546
SdfValueTypeName Point3f
Definition: types.h:530
SdfValueTypeName Double3
Definition: types.h:529
SdfValueTypeName UInt
Definition: types.h:523
SdfValueTypeName Double3Array
Definition: types.h:551
SdfValueTypeName String
Definition: types.h:525
SdfValueTypeName Float4
Definition: types.h:528
SdfValueTypeName UInt64Array
Definition: types.h:545
bool operator==(SdfHumanReadableValue const &other) const
Definition: types.h:614
SdfValueTypeName Matrix4d
Definition: types.h:536
SdfVariability
Definition: types.h:173
SdfValueTypeName Matrix3dArray
Definition: types.h:558
#define SDF_API
Definition: api.h:40
SdfValueTypeName Color3dArray
Definition: types.h:555
SdfValueTypeName Point3d
Definition: types.h:530
SDF_API TfStaticData< const Sdf_ValueTypeNamesType, Sdf_ValueTypeNamesType::_Init > SdfValueTypeNames
SdfValueTypeName Color3hArray
Definition: types.h:555
SdfValueTypeName Bool
Definition: types.h:522
SdfValueTypeName Normal3dArray
Definition: types.h:554
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:545
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
SdfValueTypeName Color4hArray
Definition: types.h:556
SdfValueTypeName Vector3d
Definition: types.h:531
SdfValueTypeName Half4Array
Definition: types.h:549
SdfSpecType
Definition: types.h:85
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
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:617
GA_API const UT_StringHolder N
SdfValueTypeName Int2
Definition: types.h:526
bool operator!=(const SdfValueBlock &block) const
Definition: types.h:598
Definition: type.h:64
#define ARCH_PRAGMA_MACRO_TOO_FEW_ARGUMENTS
Definition: pragmas.h:206
SDF_API size_t hash_value(const SdfHumanReadableValue &hrval)
SdfHumanReadableValue(std::string const &text)
Definition: types.h:612
SdfValueTypeName TexCoord3hArray
Definition: types.h:561
SdfValueTypeName TexCoord3dArray
Definition: types.h:561
SdfValueTypeName Int
Definition: types.h:523
SdfValueTypeName TexCoord3f
Definition: types.h:539
#define _SDF_UNITS
Definition: types.h:234
Definition: core.h:1131
SdfValueTypeName Point3dArray
Definition: types.h:552
SDF_API bool SdfValueHasValidType(VtValue const &value)
Given a value, returns if there is a valid corresponding valueType.
SdfValueTypeName Half3Array
Definition: types.h:549
#define SDF_DECLARE_VALUE_TYPE_TRAITS(unused, elem)
Definition: types.h:390
SdfValueTypeName Half4
Definition: types.h:527
SdfValueTypeName QuathArray
Definition: types.h:557
std::map< double, VtValue > SdfTimeSampleMap
A map from sample times to sample values.
Definition: types.h:287
SdfValueTypeName Double2
Definition: types.h:529
#define _SDF_FOR_EACH_UNITS(macro, args)
Definition: types.h:260
SdfValueTypeName Group
Definition: types.h:541
SdfValueTypeName Int64
Definition: types.h:523
static const bool IsValueType
Definition: types.h:380
SdfValueTypeName AssetArray
Definition: types.h:547
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:164
SdfValueTypeName Vector3f
Definition: types.h:531
SdfValueTypeName BoolArray
Definition: types.h:544
SdfValueTypeName Float3Array
Definition: types.h:550
#define SDF_VALUE_TYPES
Definition: types.h:372
SdfValueTypeName Double4Array
Definition: types.h:551
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:251
SdfValueTypeName TexCoord3h
Definition: types.h:539
SdfValueTypeName Quatd
Definition: types.h:535
bool operator==(const SdfValueBlock &block) const
Definition: types.h:597
SDF_API bool operator!=(const SdfUnregisteredValue &other) const
Returns true if the wrapped VtValues are not equal.
SdfValueTypeName TexCoord2d
Definition: types.h:538
SdfPermission
Definition: types.h:149
friend size_t hash_value(const SdfUnregisteredValue &uv)
Hash.
Definition: types.h:501
SDF_API SdfUnregisteredValue()
Wraps an empty VtValue.