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 
187 /// An enum for TfError codes related to authoring operations.
188 ///
189 /// <b>SdfAuthoringError:</b>
190 /// <ul>
191 /// <li><b>SdfAuthoringErrorUnrecognizedFields.</b> This error is raised if
192 /// SdfLayer::TransferContent, or SdfLayer::SetField API is called
193 /// for layers of differing schema, and fields from the source layer
194 /// are not recognized by the target layer's schema.
195 /// <li><b>SdfAuthoringErrorUnrecognizedSpecType.</b> This error is raised
196 /// in attempts to create specs on layers with spec types that are
197 /// not recognized by the layer's schema.
198 /// </ul>
199 ///
201 {
204 };
205 
206 // Each category of compatible units of measurement is defined by a
207 // preprocessor sequence of tuples. Each such sequence gives rise to an enum
208 // representing the corresponding unit category. All the unit categories are
209 // listed in _SDF_UNITS where each entry is a two-tuple with the unit category
210 // name as the first element, and the second element is the units in that
211 // category. Each tuple in a unit category sequence corresponds to a unit of
212 // measurement represented by an enumerant whose name is given by concatenating
213 // 'Sdf', the unit category name, the word 'Unit' and the first entry in the
214 // tuple. (E.g. units of category 'Length' are represented by an enum named
215 // SdfLengthUnit with enumerants SdfLengthUnitInch, SdfLengthUnitMeter and so
216 // forth.) The second element in the tuple is the display name for the unit,
217 // and the third element is the relative size of the unit compared to the menv
218 // default unit for the unit category (which has a relative size of 1.0).
219 // Dimensionless quantities use a special 'Dimensionless' unit category
220 // represented by the enum SdfDimensionlessUnit.
221 #define _SDF_LENGTH_UNITS \
222 ((Millimeter, "mm", 0.001)) \
223 ((Centimeter, "cm", 0.01)) \
224 ((Decimeter, "dm", 0.1)) \
225 ((Meter, "m", 1.0)) \
226 ((Kilometer, "km", 1000.0)) \
227 ((Inch, "in", 0.0254)) \
228 ((Foot, "ft", 0.3048)) \
229 ((Yard, "yd", 0.9144)) \
230 ((Mile, "mi", 1609.344))
231 
232 #define _SDF_ANGULAR_UNITS \
233 ((Degrees, "deg", 1.0)) \
234 ((Radians, "rad", 57.2957795130823208768))
235 
236 #define _SDF_DIMENSIONLESS_UNITS \
237 ((Percent, "%", 0.01)) \
238 ((Default, "default", 1.0))
239 
240 #define _SDF_UNITS \
241 ((Length, _SDF_LENGTH_UNITS), \
242 ((Angular, _SDF_ANGULAR_UNITS), \
243 ((Dimensionless, _SDF_DIMENSIONLESS_UNITS), \
244  HBOOST_PP_NIL)))
245 
246 #define _SDF_UNIT_TAG(tup) HBOOST_PP_TUPLE_ELEM(3, 0, tup)
247 #define _SDF_UNIT_NAME(tup) HBOOST_PP_TUPLE_ELEM(3, 1, tup)
248 #define _SDF_UNIT_SCALE(tup) HBOOST_PP_TUPLE_ELEM(3, 2, tup)
249 
250 #define _SDF_UNITSLIST_CATEGORY(tup) HBOOST_PP_TUPLE_ELEM(2, 0, tup)
251 #define _SDF_UNITSLIST_TUPLES(tup) HBOOST_PP_TUPLE_ELEM(2, 1, tup)
252 #define _SDF_UNITSLIST_ENUM(elem) HBOOST_PP_CAT(HBOOST_PP_CAT(Sdf, \
253  _SDF_UNITSLIST_CATEGORY(elem)), Unit)
254 
255 #define _SDF_DECLARE_UNIT_ENUMERANT(r, tag, elem) \
256  HBOOST_PP_CAT(Sdf ## tag ## Unit, _SDF_UNIT_TAG(elem)),
257 
258 #define _SDF_DECLARE_UNIT_ENUM(r, unused, elem) \
259 enum _SDF_UNITSLIST_ENUM(elem) { \
260  HBOOST_PP_SEQ_FOR_EACH(_SDF_DECLARE_UNIT_ENUMERANT, \
261  _SDF_UNITSLIST_CATEGORY(elem), \
262  _SDF_UNITSLIST_TUPLES(elem)) \
263 };
264 HBOOST_PP_LIST_FOR_EACH(_SDF_DECLARE_UNIT_ENUM, ~, _SDF_UNITS)
265 
266 // Compute the max number of enumerants over all unit enums
267 #define _SDF_MAX_UNITS_OP(d, state, list) \
268  HBOOST_PP_MAX_D(d, state, HBOOST_PP_SEQ_SIZE(_SDF_UNITSLIST_TUPLES(list)))
269 #define _SDF_UNIT_MAX_UNITS \
270  HBOOST_PP_LIST_FOLD_LEFT(_SDF_MAX_UNITS_OP, 0, _SDF_UNITS)
271 
272 // Compute the number of unit enums
273 #define _SDF_UNIT_NUM_TYPES HBOOST_PP_LIST_SIZE(_SDF_UNITS)
274 
275 // Compute the number of bits needed to hold _SDF_UNIT_MAX_UNITS and
276 // _SDF_UNIT_NUM_TYPES.
277 #define _SDF_UNIT_MAX_UNITS_BITS TF_BITS_FOR_VALUES(_SDF_UNIT_MAX_UNITS)
278 #define _SDF_UNIT_TYPES_BITS TF_BITS_FOR_VALUES(_SDF_UNIT_NUM_TYPES)
279 
280 /// A map of mapper parameter names to parameter values.
281 typedef std::map<std::string, VtValue> SdfMapperParametersMap;
282 
283 /// A map of reference variant set names to variants in those sets.
284 typedef std::map<std::string, std::string> SdfVariantSelectionMap;
285 
286 /// A map of variant set names to list of variants in those sets.
287 typedef std::map<std::string, std::vector<std::string> > SdfVariantsMap;
288 
289 /// A map of source SdfPaths to target SdfPaths for relocation.
290 // Note: This map needs to be lexicographically sorted for some downstream
291 // clients, so SdfPath::FastLessThan is explicitly omitted as
292 // the Compare template parameter.
293 typedef std::map<SdfPath, SdfPath> SdfRelocatesMap;
294 
295 /// A map from sample times to sample values.
296 typedef std::map<double, VtValue> SdfTimeSampleMap;
297 
298 /// Gets the show default unit for the given /a typeName.
299 SDF_API TfEnum SdfDefaultUnit( TfToken const &typeName );
300 
301 /// Gets the show default unit for the given /a unit.
302 SDF_API const TfEnum &SdfDefaultUnit( const TfEnum &unit );
303 
304 /// Gets the unit category for a given /a unit.
306 
307 /// Converts from one unit of measure to another. The \a fromUnit and \a toUnit
308 /// units must be of the same type (for example, both of type SdfLengthUnit).
309 SDF_API double SdfConvertUnit( const TfEnum &fromUnit, const TfEnum &toUnit );
310 
311 /// Gets the name for a given /a unit.
313 
314 /// Gets a unit for the given /a name
316 
317 /// Given a value, returns if there is a valid corresponding valueType.
319 
320 /// Given an sdf valueType name, produce TfType if the type name specifies a
321 /// valid sdf value type.
323 
324 /// Given a value, produce the sdf valueType name. If you provide a value that
325 /// does not return true for SdfValueHasValidType, the return value is
326 /// unspecified.
328 
329 /// Return role name for \p typeName. Return empty token if \p typeName has no
330 /// associated role name.
332 
333 // Sdf allows a specific set of types for attribute and metadata values.
334 // These types and some additional metadata are listed in the preprocessor
335 // sequence of tuples below. First element is a tag name that is appended to
336 // 'SdfValueType' to produce the C++ traits type for the value type.
337 // Second element is the value type name, third element is the corresponding
338 // C++ type, and the fourth element is the tuple of tuple dimensions.
339 //
340 // Libraries may extend this list and define additional value types.
341 // When doing so, the type must be declared using the SDF_DECLARE_VALUE_TYPE
342 // macro below. The type must also be registered in the associated schema using
343 // SdfSchema::_RegisterValueType(s).
344 #define _SDF_SCALAR_VALUE_TYPES \
345  ((Bool, bool, bool, () )) \
346  ((UChar, uchar, unsigned char, () )) \
347  ((Int, int, int, () )) \
348  ((UInt, uint, unsigned int, () )) \
349  ((Int64, int64, int64_t, () )) \
350  ((UInt64, uint64, uint64_t, () )) \
351  ((Half, half, GfHalf, () )) \
352  ((Float, float, float, () )) \
353  ((Double, double, double, () )) \
354  ((TimeCode, timecode, SdfTimeCode, () )) \
355  ((String, string, std::string, () )) \
356  ((Token, token, TfToken, () )) \
357  ((Asset, asset, SdfAssetPath, () ))
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  (TextureCoordinate)
445 
447 
449 
457 
458 typedef std::map<std::string, SdfVariantSetSpecHandle>
460 
461 /// Writes the string representation of \c SdfSpecifier to \a out.
462 SDF_API
463 std::ostream & operator<<( std::ostream &out, const SdfSpecifier &spec );
464 
465 /// Writes the string representation of \c SdfRelocatesMap to \a out.
466 SDF_API
467 std::ostream & operator<<( std::ostream &out,
468  const SdfRelocatesMap &reloMap );
469 
470 /// Writes the string representation of \c SdfTimeSampleMap to \a out.
471 SDF_API
472 std::ostream & operator<<( std::ostream &out,
473  const SdfTimeSampleMap &sampleMap );
474 
475 SDF_API
476 std::ostream &VtStreamOut(const SdfVariantSelectionMap &, std::ostream &);
477 
478 /// \class SdfUnregisteredValue
479 /// Stores a representation of the value for an unregistered metadata
480 /// field encountered during text layer parsing.
481 ///
482 /// This provides the ability to serialize this data to a layer, as
483 /// well as limited inspection and editing capabilities (e.g., moving
484 /// this data to a different spec or field) even when the data type
485 /// of the value isn't known.
487  public hboost::equality_comparable<SdfUnregisteredValue>
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 private:
516  VtValue _value;
517 };
518 
519 /// Writes the string representation of \c SdfUnregisteredValue to \a out.
520 SDF_API std::ostream &operator << (std::ostream &out, const SdfUnregisteredValue &value);
521 
522 class Sdf_ValueTypeNamesType : hboost::noncopyable {
523 public:
542 
561 
563  struct _Init {
564  SDF_API static const Sdf_ValueTypeNamesType* New();
565  };
566 
567  // For Pixar internal backwards compatibility.
569  TfToken GetSerializationName(const VtValue&) const;
570  TfToken GetSerializationName(const TfToken&) const;
571 
572 private:
575 };
576 
579 
580 /// \class SdfValueBlock
581 /// A special value type that can be used to explicitly author an
582 /// opinion for an attribute's default value or time sample value
583 /// that represents having no value. Note that this is different
584 /// from not having a value authored.
585 ///
586 /// One could author such a value in two ways.
587 ///
588 /// \code
589 /// attribute->SetDefaultValue(VtValue(SdfValueBlock());
590 /// ...
591 /// layer->SetTimeSample(attribute->GetPath(), 101, VtValue(SdfValueBlock()));
592 /// \endcode
593 ///
594 struct SdfValueBlock {
595  bool operator==(const SdfValueBlock& block) const { return true; }
596  bool operator!=(const SdfValueBlock& block) const { return false; }
597 
598 private:
599  friend inline size_t hash_value(const SdfValueBlock &block) { return 0; }
600 };
601 
602 // Write out the string representation of a block.
603 SDF_API std::ostream& operator<<(std::ostream&, SdfValueBlock const&);
604 
605 // A class that represents a human-readable value. This is used for the special
606 // purpose of producing layers that serialize field values in alternate ways; to
607 // produce more human-readable output, for example.
609  SdfHumanReadableValue() = default;
610  explicit SdfHumanReadableValue(std::string const &text) : _text(text) {}
611 
612  bool operator==(SdfHumanReadableValue const &other) const {
613  return GetText() == other.GetText();
614  }
615  bool operator!=(SdfHumanReadableValue const &other) const {
616  return !(*this == other);
617  }
618 
619  std::string const &GetText() const { return _text; }
620 private:
621  std::string _text;
622 };
623 
624 SDF_API
625 std::ostream &operator<<(std::ostream &out, const SdfHumanReadableValue &hrval);
626 
627 SDF_API
628 size_t hash_value(const SdfHumanReadableValue &hrval);
629 
631 
632 #endif // PXR_USD_SDF_TYPES_H
SdfValueTypeName Normal3d
Definition: types.h:534
SDF_API TfType SdfGetTypeForValueTypeName(TfToken const &name)
SdfValueTypeName Float2Array
Definition: types.h:549
Definition: layer.h:94
SdfValueTypeName Color4dArray
Definition: types.h:555
SdfValueTypeName IntArray
Definition: types.h:544
SdfValueTypeName Color3fArray
Definition: types.h:554
SdfValueTypeName Double4
Definition: types.h:531
SdfValueTypeName Token
Definition: types.h:527
SdfValueTypeName QuatdArray
Definition: types.h:556
SdfValueTypeName UCharArray
Definition: types.h:544
friend size_t hash_value(const SdfValueBlock &block)
Definition: types.h:599
SdfValueTypeName TexCoord2fArray
Definition: types.h:559
SdfValueTypeName Half
Definition: types.h:526
SdfValueTypeName Asset
Definition: types.h:527
SdfValueTypeName HalfArray
Definition: types.h:545
SdfValueTypeName QuatfArray
Definition: types.h:556
SdfValueTypeName Matrix2dArray
Definition: types.h:557
SdfValueTypeName Color4f
Definition: types.h:536
SDF_API TfToken SdfGetRoleNameForValueTypeName(TfToken const &typeName)
SdfValueTypeName Int4
Definition: types.h:528
std::map< SdfPath, SdfPath > SdfRelocatesMap
A map of source SdfPaths to target SdfPaths for relocation.
Definition: types.h:293
SdfValueTypeName Point3h
Definition: types.h:532
SdfValueTypeName DoubleArray
Definition: types.h:545
GA_API const UT_StringHolder uv
SdfValueTypeName Int4Array
Definition: types.h:547
SdfValueTypeName Frame4dArray
Definition: types.h:558
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:287
SdfValueTypeName TokenArray
Definition: types.h:546
SdfValueTypeName Normal3hArray
Definition: types.h:553
SdfValueTypeName TexCoord3fArray
Definition: types.h:560
SdfValueTypeName Vector3hArray
Definition: types.h:552
#define SDF_DECLARE_VALUE_TYPE_TRAITS(r, unused, elem)
Definition: types.h:397
SdfValueTypeName Vector3fArray
Definition: types.h:552
std::map< std::string, std::string > SdfVariantSelectionMap
A map of reference variant set names to variants in those sets.
Definition: types.h:284
Definition: spec.h:51
SdfValueTypeName Color4fArray
Definition: types.h:555
SdfValueTypeName UInt64
Definition: types.h:525
friend const Sdf_ValueTypeNamesType * Sdf_InitializeValueTypeNames()
SdfValueTypeName UChar
Definition: types.h:525
SdfValueTypeName Half2
Definition: types.h:529
Definition: enum.h:139
SdfValueTypeName Normal3f
Definition: types.h:534
SdfValueTypeName Int3
Definition: types.h:528
#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:541
SdfValueTypeName TexCoord2hArray
Definition: types.h:559
GLuint const GLchar * name
Definition: glcorearb.h:786
SdfHumanReadableValue()=default
std::map< std::string, VtValue > SdfMapperParametersMap
A map of mapper parameter names to parameter values.
Definition: types.h:281
SdfValueTypeName Point3hArray
Definition: types.h:551
SdfValueTypeName Half2Array
Definition: types.h:548
HBOOST_PP_SEQ_FOR_EACH(SDF_DECLARE_VALUE_TYPE_TRAITS,~, SDF_VALUE_TYPES)
SdfValueTypeName TimeCode
Definition: types.h:526
TF_DECLARE_PUBLIC_TOKENS(SdfValueRoleNames, SDF_API, SDF_VALUE_ROLE_NAME_TOKENS)
SdfValueTypeName TexCoord2h
Definition: types.h:540
HDX_API std::ostream & operator<<(std::ostream &out, const HdxShaderInputs &pv)
SdfValueTypeName Vector3h
Definition: types.h:533
class SdfListOp< class SdfUnregisteredValue > SdfUnregisteredValueListOp
Definition: listOp.h:319
SdfValueTypeName Normal3fArray
Definition: types.h:553
SdfValueTypeName Matrix4dArray
Definition: types.h:557
SdfValueTypeName Vector3dArray
Definition: types.h:552
SdfValueTypeName Point3fArray
Definition: types.h:551
SdfValueTypeName Int3Array
Definition: types.h:547
SdfValueTypeName FloatArray
Definition: types.h:545
SdfValueTypeName Double
Definition: types.h:526
SdfValueTypeName Half3
Definition: types.h:529
SdfValueTypeName Frame4d
Definition: types.h:539
SdfValueTypeName Normal3h
Definition: types.h:534
SdfValueTypeName StringArray
Definition: types.h:546
SdfValueTypeName TexCoord2f
Definition: types.h:540
SdfValueTypeName Quath
Definition: types.h:537
SdfValueTypeName Color4d
Definition: types.h:536
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:550
SdfValueTypeName Color3h
Definition: types.h:535
SdfValueTypeName Int2Array
Definition: types.h:547
SdfValueTypeName Matrix3d
Definition: types.h:538
SdfValueTypeName Float
Definition: types.h:526
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:544
SdfValueTypeName Float4Array
Definition: types.h:549
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
SdfValueTypeName TexCoord2dArray
Definition: types.h:559
SdfValueTypeName Color3f
Definition: types.h:535
SdfValueTypeName Color3d
Definition: types.h:535
SdfValueTypeName Float2
Definition: types.h:530
SDF_API std::ostream & VtStreamOut(const SdfVariantSelectionMap &, std::ostream &)
std::map< std::string, SdfVariantSetSpecHandle > SdfVariantSetSpecHandleMap
Definition: types.h:459
SdfValueTypeName Matrix2d
Definition: types.h:538
SdfSpecifier
Definition: types.h:123
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
SdfValueTypeName Float3
Definition: types.h:530
SDF_DECLARE_HANDLES(SdfLayer)
SdfValueTypeName Color4h
Definition: types.h:536
const VtValue & GetValue() const
Returns the wrapped VtValue specified in the constructor.
Definition: types.h:503
std::string const & GetText() const
Definition: types.h:619
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:537
SdfAuthoringError
Definition: types.h:200
SdfValueTypeName TimeCodeArray
Definition: types.h:545
SdfValueTypeName Point3f
Definition: types.h:532
SdfValueTypeName Double3
Definition: types.h:531
SdfValueTypeName UInt
Definition: types.h:525
SdfValueTypeName Double3Array
Definition: types.h:550
SdfValueTypeName String
Definition: types.h:527
SdfValueTypeName Float4
Definition: types.h:530
SdfValueTypeName UInt64Array
Definition: types.h:544
bool operator==(SdfHumanReadableValue const &other) const
Definition: types.h:612
SdfValueTypeName Matrix4d
Definition: types.h:538
SdfVariability
Definition: types.h:179
SdfValueTypeName Matrix3dArray
Definition: types.h:557
#define SDF_API
Definition: api.h:40
SdfValueTypeName Color3dArray
Definition: types.h:554
SdfValueTypeName Point3d
Definition: types.h:532
SDF_API TfStaticData< const Sdf_ValueTypeNamesType, Sdf_ValueTypeNamesType::_Init > SdfValueTypeNames
SdfValueTypeName Color3hArray
Definition: types.h:554
SdfValueTypeName Bool
Definition: types.h:524
SdfValueTypeName Normal3dArray
Definition: types.h:553
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:544
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1394
SdfValueTypeName Color4hArray
Definition: types.h:555
SdfValueTypeName Vector3d
Definition: types.h:533
SdfValueTypeName Half4Array
Definition: types.h:548
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:615
GA_API const UT_StringHolder N
SdfValueTypeName Int2
Definition: types.h:528
bool operator!=(const SdfValueBlock &block) const
Definition: types.h:596
Definition: type.h:64
SDF_API size_t hash_value(const SdfHumanReadableValue &hrval)
SdfHumanReadableValue(std::string const &text)
Definition: types.h:610
SdfValueTypeName TexCoord3hArray
Definition: types.h:560
SdfValueTypeName TexCoord3dArray
Definition: types.h:560
SdfValueTypeName Int
Definition: types.h:525
SdfValueTypeName TexCoord3f
Definition: types.h:541
#define _SDF_UNITS
Definition: types.h:240
Definition: core.h:1131
SdfValueTypeName Point3dArray
Definition: types.h:551
SDF_API bool SdfValueHasValidType(VtValue const &value)
Given a value, returns if there is a valid corresponding valueType.
SdfValueTypeName Half3Array
Definition: types.h:548
SdfValueTypeName Half4
Definition: types.h:529
SdfValueTypeName QuathArray
Definition: types.h:556
std::map< double, VtValue > SdfTimeSampleMap
A map from sample times to sample values.
Definition: types.h:296
SdfValueTypeName Double2
Definition: types.h:531
#define _SDF_DECLARE_UNIT_ENUM(r, unused, elem)
Definition: types.h:258
SdfValueTypeName Int64
Definition: types.h:525
static const bool IsValueType
Definition: types.h:387
SdfValueTypeName AssetArray
Definition: types.h:546
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:166
SdfValueTypeName Vector3f
Definition: types.h:533
SdfValueTypeName BoolArray
Definition: types.h:543
SdfValueTypeName Float3Array
Definition: types.h:549
#define SDF_VALUE_TYPES
Definition: types.h:379
SdfValueTypeName Double4Array
Definition: types.h:550
SDF_API const std::string & SdfGetNameForUnit(const TfEnum &unit)
Gets the name for a given /a unit.
SdfValueTypeName TexCoord3h
Definition: types.h:541
SdfValueTypeName Quatd
Definition: types.h:537
bool operator==(const SdfValueBlock &block) const
Definition: types.h:595
SdfValueTypeName TexCoord2d
Definition: types.h:540
SdfPermission
Definition: types.h:155
friend size_t hash_value(const SdfUnregisteredValue &uv)
Hash.
Definition: types.h:508
SDF_API SdfUnregisteredValue()
Wraps an empty VtValue.