HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
clipsAPI.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef USD_GENERATED_CLIPSAPI_H
8 #define USD_GENERATED_CLIPSAPI_H
9 
10 /// \file usd/clipsAPI.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usd/api.h"
15 #include "pxr/usd/usd/prim.h"
16 #include "pxr/usd/usd/stage.h"
17 #include "pxr/usd/usd/tokens.h"
18 
19 #include "pxr/base/vt/value.h"
20 
21 #include "pxr/base/gf/vec3d.h"
22 #include "pxr/base/gf/vec3f.h"
23 #include "pxr/base/gf/matrix4d.h"
24 
25 #include "pxr/base/tf/token.h"
26 #include "pxr/base/tf/type.h"
27 
29 
30 class SdfAssetPath;
31 
32 // -------------------------------------------------------------------------- //
33 // CLIPSAPI //
34 // -------------------------------------------------------------------------- //
35 
36 /// \class UsdClipsAPI
37 ///
38 /// UsdClipsAPI is an API schema that provides an interface to
39 /// a prim's clip metadata. Clips are a "value resolution" feature that
40 /// allows one to specify a sequence of usd files (clips) to be consulted,
41 /// over time, as a source of varying overrides for the prims at and
42 /// beneath this prim in namespace.
43 ///
44 /// SetClipAssetPaths() establishes the set of clips that can be consulted.
45 /// SetClipActive() specifies the ordering of clip application over time
46 /// (clips can be repeated), while SetClipTimes() specifies time-mapping
47 /// from stage-time to clip-time for the clip active at a given stage-time,
48 /// which allows for time-dilation and repetition of clips.
49 /// Finally, SetClipPrimPath() determines the path within each clip that will
50 /// map to this prim, i.e. the location within the clip at which we will look
51 /// for opinions for this prim.
52 ///
53 /// The clip asset paths, times and active metadata can also be specified
54 /// through template clip metadata. This can be desirable when your set of
55 /// assets is very large, as the template metadata is much more concise.
56 /// SetClipTemplateAssetPath() establishes the asset identifier pattern of the
57 /// set of clips to be consulted. SetClipTemplateStride(),
58 /// SetClipTemplateEndTime(), and SetClipTemplateStartTime() specify the range
59 /// in which USD will search, based on the template. From the set of resolved
60 /// asset paths, times and active will be derived internally.
61 ///
62 /// A prim may have multiple "clip sets" -- named sets of clips that each
63 /// have their own values for the metadata described above. For example,
64 /// a prim might have a clip set named "Clips_1" that specifies some group
65 /// of clip asset paths, and another clip set named "Clips_2" that uses
66 /// an entirely different set of clip asset paths. These clip sets are
67 /// composed across composition arcs, so clip sets for a prim may be
68 /// defined in multiple sublayers or references, for example. Individual
69 /// metadata for a given clip set may be sparsely overridden.
70 ///
71 /// Important facts about clips:
72 /// \li Within the layerstack in which clips are established, the
73 /// opinions within the clips will be \em weaker than any local opinions
74 /// in the layerstack, but em stronger than varying opinions coming across
75 /// references and variants.
76 /// \li We will never look for metadata or default opinions in clips
77 /// when performing value resolution on the owning stage, since these
78 /// quantities must be time-invariant.
79 ///
80 /// This leads to the common structure in which we reference a model asset
81 /// on a prim, and then author clips at the same site: the asset reference
82 /// will provide the topology and unvarying data for the model, while the
83 /// clips will provide the time-sampled animation.
84 ///
85 /// For further information, see \ref Usd_Page_ValueClips
86 ///
87 ///
89 {
90 public:
91  /// Compile time constant representing what kind of schema this class is.
92  ///
93  /// \sa UsdSchemaKind
95 
96  /// Construct a UsdClipsAPI on UsdPrim \p prim .
97  /// Equivalent to UsdClipsAPI::Get(prim.GetStage(), prim.GetPath())
98  /// for a \em valid \p prim, but will not immediately throw an error for
99  /// an invalid \p prim
100  explicit UsdClipsAPI(const UsdPrim& prim=UsdPrim())
101  : UsdAPISchemaBase(prim)
102  {
103  }
104 
105  /// Construct a UsdClipsAPI on the prim held by \p schemaObj .
106  /// Should be preferred over UsdClipsAPI(schemaObj.GetPrim()),
107  /// as it preserves SchemaBase state.
108  explicit UsdClipsAPI(const UsdSchemaBase& schemaObj)
109  : UsdAPISchemaBase(schemaObj)
110  {
111  }
112 
113  /// Destructor.
114  USD_API
115  virtual ~UsdClipsAPI();
116 
117  /// Return a vector of names of all pre-declared attributes for this schema
118  /// class and all its ancestor classes. Does not include attributes that
119  /// may be authored by custom/extended methods of the schemas involved.
120  USD_API
121  static const TfTokenVector &
122  GetSchemaAttributeNames(bool includeInherited=true);
123 
124  /// Return a UsdClipsAPI holding the prim adhering to this
125  /// schema at \p path on \p stage. If no prim exists at \p path on
126  /// \p stage, or if the prim at that path does not adhere to this schema,
127  /// return an invalid schema object. This is shorthand for the following:
128  ///
129  /// \code
130  /// UsdClipsAPI(stage->GetPrimAtPath(path));
131  /// \endcode
132  ///
133  USD_API
134  static UsdClipsAPI
135  Get(const UsdStagePtr &stage, const SdfPath &path);
136 
137 
138 protected:
139  /// Returns the kind of schema this class belongs to.
140  ///
141  /// \sa UsdSchemaKind
142  USD_API
143  UsdSchemaKind _GetSchemaKind() const override;
144 
145 private:
146  // needs to invoke _GetStaticTfType.
147  friend class UsdSchemaRegistry;
148  USD_API
149  static const TfType &_GetStaticTfType();
150 
151  static bool _IsTypedSchema();
152 
153  // override SchemaBase virtuals.
154  USD_API
155  const TfType &_GetTfType() const override;
156 
157 public:
158  // ===================================================================== //
159  // Feel free to add custom code below this line, it will be preserved by
160  // the code generator.
161  //
162  // Just remember to:
163  // - Close the class declaration with };
164  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
165  // - Close the include guard with #endif
166  // ===================================================================== //
167  // --(BEGIN CUSTOM CODE)--
168  //
169 
170  // --------------------------------------------------------------------- //
171  /// \anchor Usd_ClipInfo_API
172  /// \name Value Clip Info
173  ///
174  /// Setters and getters for interacting with metadata that control
175  /// value clip behavior.
176  ///
177  /// @{
178  // --------------------------------------------------------------------- //
179 
180  /// Dictionary that contains the definition of the clip sets on this prim.
181  ///
182  /// Each entry in this dictionary defines a clip set: the entry's key
183  /// is the name of the clip set and the entry's value is a dictionary
184  /// containing the metadata that specifies the clips in the set.
185  ///
186  /// See \ref UsdClipsAPIInfoKeys for the keys used for each clip set's
187  /// dictionary, or use the other API to set or get values for a given
188  /// clip set.
189  USD_API
190  bool GetClips(VtDictionary* clips) const;
191 
192  /// Set the clips dictionary for this prim.
193  /// \sa GetClips
194  USD_API
195  bool SetClips(const VtDictionary& clips);
196 
197  /// ListOp that may be used to affect how opinions from clip
198  /// sets are applied during value resolution.
199  ///
200  /// By default, clip sets in a layer stack are examined in
201  /// lexicographical order by name for attribute values during value
202  /// resolution. The clip sets listOp can be used to reorder the clip
203  /// sets in a layer stack or remove them entirely from consideration
204  /// during value resolution without modifying the clips dictionary.
205  ///
206  /// This is *not* the list of clip sets that are authored on this prim.
207  /// To retrieve that information, use GetClips to examine the clips
208  /// dictionary directly.
209  ///
210  /// This function returns the clip sets listOp from the current edit
211  /// target.
212  USD_API
213  bool GetClipSets(SdfStringListOp* clipSets) const;
214 
215  /// Set the clip sets list op for this prim.
216  /// \sa GetClipSets
217  USD_API
218  bool SetClipSets(const SdfStringListOp& clipSets);
219 
220  /// Computes and resolves the list of clip asset paths used by the
221  /// clip set named \p clipSet. This is the same list of paths that
222  /// would be used during value resolution.
223  ///
224  /// If the clip set is defined using template clip metadata, this
225  /// function will compute the asset paths based on the template
226  /// parameters. Otherwise this function will use the authored
227  /// clipAssetPaths.
228  USD_API
230  ComputeClipAssetPaths(const std::string& clipSet) const;
231 
232  /// \overload
233  /// This function operates on the default clip set.
234  USD_API
236 
237  /// List of asset paths to the clips in the clip set named \p clipSet.
238  /// This list is unordered, but elements in this list are referred to
239  /// by index in other clip-related fields.
240  USD_API
241  bool GetClipAssetPaths(VtArray<SdfAssetPath>* assetPaths,
242  const std::string& clipSet) const;
243  /// \overload
244  /// This function operates on the default clip set.
245  /// \sa \ref UsdClipsAPISetNames
246  USD_API
247  bool GetClipAssetPaths(VtArray<SdfAssetPath>* assetPaths) const;
248 
249  /// Set the clip asset paths for the clip set named \p clipSet
250  /// \sa GetClipAssetPaths()
251  USD_API
252  bool SetClipAssetPaths(const VtArray<SdfAssetPath>& assetPaths,
253  const std::string& clipSet);
254  /// \overload
255  /// This function operates on the default clip set.
256  /// \sa \ref UsdClipsAPISetNames
257  USD_API
258  bool SetClipAssetPaths(const VtArray<SdfAssetPath>& assetPaths);
259 
260  /// Path to the prim in the clips in the clip set named \p clipSet
261  /// from which time samples will be read.
262  ///
263  /// This prim's path will be substituted with this value to determine
264  /// the final path in the clip from which to read data. For instance,
265  /// if this prims' path is '/Prim_1', the clip prim path is '/Prim',
266  /// and we want to get values for the attribute '/Prim_1.size'. The
267  /// clip prim path will be substituted in, yielding '/Prim.size', and
268  /// each clip will be examined for values at that path.
269  USD_API
270  bool GetClipPrimPath(std::string* primPath,
271  const std::string& clipSet) const;
272  /// \overload
273  /// This function operates on the default clip set.
274  /// \sa \ref UsdClipsAPISetNames
275  USD_API
276  bool GetClipPrimPath(std::string* primPath) const;
277 
278  /// Set the clip prim path for the clip set named \p clipSet.
279  /// \sa GetClipPrimPath()
280  USD_API
281  bool SetClipPrimPath(const std::string& primPath,
282  const std::string& clipSet);
283  /// \overload
284  /// This function operates on the default clip set.
285  /// \sa \ref UsdClipsAPISetNames
286  USD_API
287  bool SetClipPrimPath(const std::string& primPath);
288 
289  /// List of pairs (time, clip index) indicating the time on the stage
290  /// at which the clip in the clip set named \p clipSet specified by
291  /// the clip index is active. For instance, a value of
292  /// [(0.0, 0), (20.0, 1)] indicates that clip 0 is active at time 0
293  /// and clip 1 is active at time 20.
294  USD_API
295  bool GetClipActive(VtVec2dArray* activeClips,
296  const std::string& clipSet) const;
297  /// \overload
298  /// This function operates on the default clip set.
299  /// \sa \ref UsdClipsAPISetNames
300  USD_API
301  bool GetClipActive(VtVec2dArray* activeClips) const;
302 
303  /// Set the active clip metadata for the clip set named \p clipSet.
304  /// \sa GetClipActive()
305  USD_API
306  bool SetClipActive(const VtVec2dArray& activeClips,
307  const std::string& clipSet);
308  /// \overload
309  /// This function operates on the default clip set.
310  /// \sa \ref UsdClipsAPISetNames
311  USD_API
312  bool SetClipActive(const VtVec2dArray& activeClips);
313 
314  /// List of pairs (stage time, clip time) indicating the time in the
315  /// active clip in the clip set named \p clipSet that should be
316  /// consulted for values at the corresponding stage time.
317  ///
318  /// During value resolution, this list will be sorted by stage time;
319  /// times will then be linearly interpolated between consecutive entries.
320  /// For instance, for clip times [(0.0, 0.0), (10.0, 20.0)],
321  /// at stage time 0, values from the active clip at time 0 will be used,
322  /// at stage time 5, values from the active clip at time 10, and at stage
323  /// time 10, clip values at time 20.
324  USD_API
325  bool GetClipTimes(VtVec2dArray* clipTimes,
326  const std::string& clipSet) const;
327  /// \overload
328  /// This function operates on the default clip set.
329  /// \sa \ref UsdClipsAPISetNames
330  USD_API
331  bool GetClipTimes(VtVec2dArray* clipTimes) const;
332 
333  /// Set the clip times metadata for this prim.
334  /// \sa GetClipTimes()
335  USD_API
336  bool SetClipTimes(const VtVec2dArray& clipTimes,
337  const std::string& clipSet);
338  /// \overload
339  /// This function operates on the default clip set.
340  /// \sa \ref UsdClipsAPISetNames
341  USD_API
342  bool SetClipTimes(const VtVec2dArray& clipTimes);
343 
344  /// Asset path for the clip manifest for the clip set named \p clipSet.
345  /// The clip manifest indicates which attributes have time samples
346  /// authored in the clips specified on this prim. During value resolution,
347  /// clips will only be examined if the attribute exists and is declared
348  /// as varying in the manifest. See \ref Usd_ValueClips_ClipManifest for
349  /// more details.
350  ///
351  /// For instance, if this prim's path is </Prim_1>, the clip prim path is
352  /// </Prim>, and we want values for the attribute </Prim_1.size>, we will
353  /// only look within this prim's clips if the attribute </Prim.size>
354  /// exists and is varying in the manifest.
355  USD_API
356  bool GetClipManifestAssetPath(SdfAssetPath* manifestAssetPath,
357  const std::string& clipSet) const;
358  /// \overload
359  /// This function operates on the default clip set.
360  /// \sa \ref UsdClipsAPISetNames
361  USD_API
362  bool GetClipManifestAssetPath(SdfAssetPath* manifestAssetPath) const;
363 
364  /// Set the clip manifest asset path for this prim.
365  /// \sa GetClipManifestAssetPath()
366  USD_API
367  bool SetClipManifestAssetPath(const SdfAssetPath& manifestAssetPath,
368  const std::string& clipSet);
369  /// \overload
370  /// This function operates on the default clip set.
371  /// \sa \ref UsdClipsAPISetNames
372  USD_API
373  bool SetClipManifestAssetPath(const SdfAssetPath& manifestAssetPath);
374 
375  /// Create a clip manifest containing entries for all attributes in the
376  /// value clips for clip set \p clipSet. This returns an anonymous layer
377  /// that can be exported and reused (\see SetClipManifestAssetPath).
378  ///
379  /// If \p writeBlocksForClipsWithMissingValues is \c true, the generated
380  /// manifest will have value blocks authored for each attribute at the
381  /// activation times of clips that do not contain time samples for that
382  /// attribute. This accelerates searches done when the interpolation of
383  /// missing clip values is enabled. See GetInterpolateMissingClipValues
384  /// and \ref Usd_ValueClips_ClipValueResolution_InterpolatingGaps for more
385  /// details.
386  ///
387  /// Returns an invalid SdfLayerRefPtr on failure.
388  USD_API
390  const std::string& clipSet,
391  bool writeBlocksForClipsWithMissingValues = false) const;
392 
393  /// \overload
394  /// This function operates on the default clip set.
395  /// \sa \ref UsdClipsAPISetNames
396  USD_API
398  bool writeBlocksForClipsWithMissingValues = false) const;
399 
400  /// Create a clip manifest containing entries for all attributes in the
401  /// given \p clipLayers that belong to the prim at \p clipPrimPath and
402  /// all descendants. This returns an anonymous layer that can be exported
403  /// and reused (\see SetClipManifestAssetPath).
404  ///
405  /// Returns an invalid SdfLayerRefPtr on failure.
406  USD_API
407  static SdfLayerRefPtr
408  GenerateClipManifestFromLayers(const SdfLayerHandleVector& clipLayers,
409  const SdfPath& clipPrimPath);
410 
411  // Flag indicating whether values for a clip that does not contain authored
412  // time samples are interpolated from surrounding clips.
413  //
414  // If this flag is set, values for clips that do not have authored time
415  // samples for an attribute that is declared in the manifest without a
416  // fallback value will be interpolated from values in surrounding clips.
417  // This is disabled by default.
418  USD_API
419  bool GetInterpolateMissingClipValues(bool* interpolate,
420  const std::string& clipSet) const;
421 
422  /// \overload
423  /// This function operates on the default clip set.
424  USD_API
425  bool GetInterpolateMissingClipValues(bool* interpolate) const;
426 
427  /// Set whether missing clip values are interpolated from surrounding
428  /// clips.
429  USD_API
430  bool SetInterpolateMissingClipValues(bool interpolate,
431  const std::string& clipSet);
432 
433  /// \overload
434  /// This function operates on the default clip set.
435  USD_API
436  bool SetInterpolateMissingClipValues(bool interpolate);
437 
438  /// A template string representing a set of assets to be used as clips
439  /// for the clip set named \p clipSet. This string can be of two forms:
440  ///
441  /// integer frames: path/basename.###.usd
442  ///
443  /// subinteger frames: path/basename.##.##.usd.
444  ///
445  /// For the integer portion of the specification, USD will take
446  /// a particular time, determined by the template start time, stride, and
447  /// end time, and pad it with zeros up to the number of hashes provided
448  /// so long as the number of hashes is greater than the digits required
449  /// to specify the integer value.
450  ///
451  /// For instance:
452  ///
453  /// time = 12, template asset path = foo.##.usd => foo.12.usd
454  /// time = 12, template asset path = foo.###.usd => foo.012.usd
455  /// time = 333, template asset path = foo.#.usd => foo.333.usd
456  ///
457  /// In the case of subinteger portion of a specifications, USD requires the
458  /// specification to be exact.
459  ///
460  /// For instance:
461  ///
462  /// time = 1.15, template asset path = foo.#.###.usd => foo.1.150.usd
463  /// time = 1.145, template asset path = foo.#.##.usd => foo.1.15.usd
464  /// time = 1.1, template asset path = foo.#.##.usd => foo.1.10.usd
465  ///
466  /// Note that USD requires that hash groups be adjacent in the string,
467  /// and that there only be one or two such groups.
468  USD_API
469  bool GetClipTemplateAssetPath(std::string* clipTemplateAssetPath,
470  const std::string& clipSet) const;
471  /// \overload
472  /// This function operates on the default clip set.
473  /// \sa \ref UsdClipsAPISetNames
474  USD_API
475  bool GetClipTemplateAssetPath(std::string* clipTemplateAssetPath) const;
476 
477  /// Set the clip template asset path for the clip set named \p clipSet.
478  /// \sa GetClipTemplateAssetPath
479  USD_API
480  bool SetClipTemplateAssetPath(const std::string& clipTemplateAssetPath,
481  const std::string& clipSet);
482  /// \overload
483  /// This function operates on the default clip set.
484  /// \sa \ref UsdClipsAPISetNames
485  USD_API
486  bool SetClipTemplateAssetPath(const std::string& clipTemplateAssetPath);
487 
488  /// A double representing the increment value USD will use when
489  /// searching for asset paths for the clip set named \p clipSet.
490  /// \sa GetClipTemplateAssetPath.
491  USD_API
492  bool GetClipTemplateStride(double* clipTemplateStride,
493  const std::string& clipSet) const;
494  /// \overload
495  /// This function operates on the default clip set.
496  /// \sa \ref UsdClipsAPISetNames
497  USD_API
498  bool GetClipTemplateStride(double* clipTemplateStride) const;
499 
500  /// Set the clip template offset for the clip set named \p clipSet.
501  /// \sa GetClipTemplateActiveOffset
502  USD_API
503  bool SetClipTemplateActiveOffset(const double clipTemplateActiveOffset,
504  const std::string& clipSet);
505 
506  /// \overload
507  /// This function operates on the default clip set.
508  /// \sa \ref UsdClipsAPISetNames
509  USD_API
510  bool SetClipTemplateActiveOffset(const double clipTemplateActiveOffset);
511 
512  /// A double representing the offset value used by USD when
513  /// determining the active period for each clip.
514  USD_API
515  bool GetClipTemplateActiveOffset(double* clipTemplateActiveOffset,
516  const std::string& clipSet) const;
517 
518  /// \overload
519  /// This function operates on the default clip set.
520  /// \sa \ref UsdClipsAPISetNames
521  USD_API
522  bool GetClipTemplateActiveOffset(double* clipTemplateActiveOffset) const;
523 
524  /// Set the template stride for the clip set named \p clipSet.
525  /// \sa GetClipTemplateStride()
526  USD_API
527  bool SetClipTemplateStride(const double clipTemplateStride,
528  const std::string& clipSet);
529  /// \overload
530  /// This function operates on the default clip set.
531  /// \sa \ref UsdClipsAPISetNames
532  USD_API
533  bool SetClipTemplateStride(const double clipTemplateStride);
534 
535  /// A double which indicates the start of the range USD will use
536  /// to search for asset paths for the clip set named \p clipSet.
537  /// This value is inclusive in that range.
538  /// \sa GetClipTemplateAssetPath.
539  USD_API
540  bool GetClipTemplateStartTime(double* clipTemplateStartTime,
541  const std::string& clipSet) const;
542  /// \overload
543  /// This function operates on the default clip set.
544  /// \sa \ref UsdClipsAPISetNames
545  USD_API
546  bool GetClipTemplateStartTime(double* clipTemplateStartTime) const;
547 
548  /// Set the template start time for the clip set named \p clipSet.
549  /// \sa GetClipTemplateStartTime
550  USD_API
551  bool SetClipTemplateStartTime(const double clipTemplateStartTime,
552  const std::string& clipSet);
553  /// \overload
554  /// This function operates on the default clip set.
555  /// \sa \ref UsdClipsAPISetNames
556  USD_API
557  bool SetClipTemplateStartTime(const double clipTemplateStartTime);
558 
559  /// A double which indicates the end of the range USD will use to
560  /// to search for asset paths for the clip set named \p clipSet.
561  /// This value is inclusive in that range.
562  /// \sa GetClipTemplateAssetPath.
563  USD_API
564  bool GetClipTemplateEndTime(double* clipTemplateEndTime,
565  const std::string& clipSet) const;
566  /// \overload
567  /// This function operates on the default clip set.
568  /// \sa \ref UsdClipsAPISetNames
569  USD_API
570  bool GetClipTemplateEndTime(double* clipTemplateEndTime) const;
571 
572  /// Set the template end time for the clipset named \p clipSet.
573  /// \sa GetClipTemplateEndTime()
574  USD_API
575  bool SetClipTemplateEndTime(const double clipTemplateEndTime,
576  const std::string& clipSet);
577  /// \overload
578  /// This function operates on the default clip set.
579  /// \sa \ref UsdClipsAPISetNames
580  USD_API
581  bool SetClipTemplateEndTime(const double clipTemplateEndTime);
582 
583  /// @}
584 
585 };
586 
587 /// \hideinitializer
588 #define USDCLIPS_INFO_KEYS \
589  (active) \
590  (assetPaths) \
591  (interpolateMissingClipValues) \
592  (manifestAssetPath) \
593  (primPath) \
594  (templateAssetPath) \
595  (templateEndTime) \
596  (templateStartTime) \
597  (templateStride) \
598  (templateActiveOffset) \
599  (times) \
600 
601 /// \anchor UsdClipsAPIInfoKeys
602 ///
603 /// <b>UsdClipsAPIInfoKeys</b> provides tokens for the various entries
604 /// in the clips dictionary. UsdClipsAPI provides named API corresponding
605 /// to each of these entries; see documentation on API for expected values.
606 ///
607 /// \sa UsdClipsAPI::GetClips
608 ///
609 /// The keys provided here are:
610 /// \li <b>active</b> - see UsdClipsAPI::GetClipActive
611 /// \li <b>assetPaths</b> - see UsdClipsAPI::GetClipAssetPaths
612 /// \li <b>manifestAssetPath</b> - see UsdClipsAPI::GetClipManifestAssetPath
613 /// \li <b>primPath</b> - see UsdClipsAPI::GetClipPrimPath
614 /// \li <b>templateAssetPath</b> - see UsdClipsAPI::GetClipTemplateAssetPath
615 /// \li <b>templateEndTime</b> - see UsdClipsAPI::GetClipTemplateEndTime
616 /// \li <b>templateStartTime</b> - see UsdClipsAPI::GetClipTemplateStartTime
617 /// \li <b>templateStride</b> - see UsdClipsAPI::GetClipTemplateStride
618 /// \li <b>templateActiveOffset</b> - see UsdClipsAPI::GetClipTemplateActiveOffset
619 /// \li <b>times</b> - see UsdClipsAPI::GetClipTimes
620 /// \li <b>interpolateMissingClipValues</b> - see UsdClipsAPI::GetInterpolateMissingClipValues
622 
623 /// \hideinitializer
624 #define USDCLIPS_SET_NAMES \
625  ((default_, "default")) \
626 
627 /// \anchor UsdClipsAPISetNames
628 ///
629 /// <b>UsdClipsAPISetNames</b> provides tokens for pre-defined clip set
630 /// names that may be used with the
631 /// \ref Usd_ClipInfo_API "value clip info functions" on UsdClipsAPI.
632 ///
633 /// The tokens are:
634 /// \li <b>default_</b> - The default clip set used for API where no clip set is specified.
636 
638 
639 #endif
static USD_API UsdClipsAPI Get(const UsdStagePtr &stage, const SdfPath &path)
USD_API bool SetClipTimes(const VtVec2dArray &clipTimes, const std::string &clipSet)
Non-applied API schema.
USD_API bool SetClipTemplateAssetPath(const std::string &clipTemplateAssetPath, const std::string &clipSet)
#define USD_API
Definition: api.h:23
USD_API bool SetClipTemplateStartTime(const double clipTemplateStartTime, const std::string &clipSet)
static USD_API SdfLayerRefPtr GenerateClipManifestFromLayers(const SdfLayerHandleVector &clipLayers, const SdfPath &clipPrimPath)
static const UsdSchemaKind schemaKind
Definition: clipsAPI.h:94
USD_API bool SetClipTemplateActiveOffset(const double clipTemplateActiveOffset, const std::string &clipSet)
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
USD_API bool SetClipActive(const VtVec2dArray &activeClips, const std::string &clipSet)
UsdClipsAPI(const UsdPrim &prim=UsdPrim())
Definition: clipsAPI.h:100
virtual USD_API ~UsdClipsAPI()
Destructor.
USD_API bool GetClipPrimPath(std::string *primPath, const std::string &clipSet) const
USD_API bool GetClipTemplateEndTime(double *clipTemplateEndTime, const std::string &clipSet) const
USD_API bool GetClipTemplateStride(double *clipTemplateStride, const std::string &clipSet) const
USD_API bool GetClipManifestAssetPath(SdfAssetPath *manifestAssetPath, const std::string &clipSet) const
USD_API bool SetClipManifestAssetPath(const SdfAssetPath &manifestAssetPath, const std::string &clipSet)
USD_API bool SetClips(const VtDictionary &clips)
#define USDCLIPS_SET_NAMES
Definition: clipsAPI.h:624
TF_DECLARE_PUBLIC_TOKENS(UsdClipsAPIInfoKeys, USD_API, USDCLIPS_INFO_KEYS)
Definition: prim.h:116
class SdfListOp< std::string > SdfStringListOp
Definition: listOp.h:371
USD_API bool GetClipTemplateStartTime(double *clipTemplateStartTime, const std::string &clipSet) const
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
USD_API bool GetClipAssetPaths(VtArray< SdfAssetPath > *assetPaths, const std::string &clipSet) const
USD_API bool SetClipPrimPath(const std::string &primPath, const std::string &clipSet)
Definition: types.h:153
Definition: path.h:273
USD_API VtArray< SdfAssetPath > ComputeClipAssetPaths() const
USD_API bool GetClipTimes(VtVec2dArray *clipTimes, const std::string &clipSet) const
USD_API bool SetClipSets(const SdfStringListOp &clipSets)
UsdSchemaKind
Definition: common.h:112
USD_API bool SetClipTemplateEndTime(const double clipTemplateEndTime, const std::string &clipSet)
UsdClipsAPI(const UsdSchemaBase &schemaObj)
Definition: clipsAPI.h:108
USD_API bool GetClipTemplateAssetPath(std::string *clipTemplateAssetPath, const std::string &clipSet) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
USD_API bool SetClipAssetPaths(const VtArray< SdfAssetPath > &assetPaths, const std::string &clipSet)
USD_API bool GetClipActive(VtVec2dArray *activeClips, const std::string &clipSet) const
USD_API UsdSchemaKind _GetSchemaKind() const override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: type.h:47
USD_API bool GetClips(VtDictionary *clips) const
USD_API bool SetInterpolateMissingClipValues(bool interpolate, const std::string &clipSet)
static USD_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
#define USDCLIPS_INFO_KEYS
Definition: clipsAPI.h:588
USD_API SdfLayerRefPtr GenerateClipManifest(const std::string &clipSet, bool writeBlocksForClipsWithMissingValues=false) const
USD_API bool GetClipTemplateActiveOffset(double *clipTemplateActiveOffset, const std::string &clipSet) const
USD_API bool GetInterpolateMissingClipValues(bool *interpolate, const std::string &clipSet) const
USD_API bool SetClipTemplateStride(const double clipTemplateStride, const std::string &clipSet)
USD_API bool GetClipSets(SdfStringListOp *clipSets) const