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