Loading...
Searching...
No Matches
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
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"
24
25#include "pxr/base/tf/token.h"
26#include "pxr/base/tf/type.h"
27
28PXR_NAMESPACE_OPEN_SCOPE
29
30class SdfAssetPath;
31
32// -------------------------------------------------------------------------- //
33// CLIPSAPI //
34// -------------------------------------------------------------------------- //
35
89{
90public:
95
100 explicit UsdClipsAPI(const UsdPrim& prim=UsdPrim())
101 : UsdAPISchemaBase(prim)
102 {
103 }
104
108 explicit UsdClipsAPI(const UsdSchemaBase& schemaObj)
109 : UsdAPISchemaBase(schemaObj)
110 {
111 }
112
114 USD_API
115 virtual ~UsdClipsAPI();
116
120 USD_API
121 static const TfTokenVector &
122 GetSchemaAttributeNames(bool includeInherited=true);
123
133 USD_API
134 static UsdClipsAPI
135 Get(const UsdStagePtr &stage, const SdfPath &path);
136
137
138protected:
142 USD_API
144
145private:
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
157public:
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 // --------------------------------------------------------------------- //
178 // --------------------------------------------------------------------- //
179
189 USD_API
190 bool GetClips(VtDictionary* clips) const;
191
197 USD_API
198 bool SetClips(const VtDictionary& clips);
199
215 USD_API
216 bool GetClipSets(SdfStringListOp* clipSets) const;
217
220 USD_API
221 bool SetClipSets(const SdfStringListOp& clipSets);
222
231 USD_API
233 ComputeClipAssetPaths(const std::string& clipSet) const;
234
237 USD_API
239
243 USD_API
245 const std::string& clipSet) const;
249 USD_API
251
254 USD_API
256 const std::string& clipSet);
260 USD_API
262
272 USD_API
273 bool GetClipPrimPath(std::string* primPath,
274 const std::string& clipSet) const;
278 USD_API
279 bool GetClipPrimPath(std::string* primPath) const;
280
283 USD_API
284 bool SetClipPrimPath(const std::string& primPath,
285 const std::string& clipSet);
289 USD_API
290 bool SetClipPrimPath(const std::string& primPath);
291
297 USD_API
298 bool GetClipActive(VtVec2dArray* activeClips,
299 const std::string& clipSet) const;
303 USD_API
304 bool GetClipActive(VtVec2dArray* activeClips) const;
305
308 USD_API
309 bool SetClipActive(const VtVec2dArray& activeClips,
310 const std::string& clipSet);
314 USD_API
315 bool SetClipActive(const VtVec2dArray& activeClips);
316
327 USD_API
328 bool GetClipTimes(VtVec2dArray* clipTimes,
329 const std::string& clipSet) const;
333 USD_API
334 bool GetClipTimes(VtVec2dArray* clipTimes) const;
335
338 USD_API
339 bool SetClipTimes(const VtVec2dArray& clipTimes,
340 const std::string& clipSet);
344 USD_API
345 bool SetClipTimes(const VtVec2dArray& clipTimes);
346
358 USD_API
359 bool GetClipManifestAssetPath(SdfAssetPath* manifestAssetPath,
360 const std::string& clipSet) const;
364 USD_API
365 bool GetClipManifestAssetPath(SdfAssetPath* manifestAssetPath) const;
366
369 USD_API
370 bool SetClipManifestAssetPath(const SdfAssetPath& manifestAssetPath,
371 const std::string& clipSet);
375 USD_API
376 bool SetClipManifestAssetPath(const SdfAssetPath& manifestAssetPath);
377
391 USD_API
393 const std::string& clipSet,
394 bool writeBlocksForClipsWithMissingValues = false) const;
395
399 USD_API
401 bool writeBlocksForClipsWithMissingValues = false) const;
402
409 USD_API
410 static SdfLayerRefPtr
411 GenerateClipManifestFromLayers(const SdfLayerHandleVector& clipLayers,
412 const SdfPath& clipPrimPath);
413
414 // Flag indicating whether values for a clip that does not contain authored
415 // time samples are interpolated from surrounding clips.
416 //
417 // If this flag is set, values for clips that do not have authored time
418 // samples for an attribute that is declared in the manifest without a
419 // fallback value will be interpolated from values in surrounding clips.
420 // This is disabled by default.
421 USD_API
422 bool GetInterpolateMissingClipValues(bool* interpolate,
423 const std::string& clipSet) const;
424
427 USD_API
428 bool GetInterpolateMissingClipValues(bool* interpolate) const;
429
432 USD_API
433 bool SetInterpolateMissingClipValues(bool interpolate,
434 const std::string& clipSet);
435
438 USD_API
439 bool SetInterpolateMissingClipValues(bool interpolate);
440
471 USD_API
472 bool GetClipTemplateAssetPath(std::string* clipTemplateAssetPath,
473 const std::string& clipSet) const;
477 USD_API
478 bool GetClipTemplateAssetPath(std::string* clipTemplateAssetPath) const;
479
482 USD_API
483 bool SetClipTemplateAssetPath(const std::string& clipTemplateAssetPath,
484 const std::string& clipSet);
488 USD_API
489 bool SetClipTemplateAssetPath(const std::string& clipTemplateAssetPath);
490
494 USD_API
495 bool GetClipTemplateStride(double* clipTemplateStride,
496 const std::string& clipSet) const;
500 USD_API
501 bool GetClipTemplateStride(double* clipTemplateStride) const;
502
505 USD_API
506 bool SetClipTemplateActiveOffset(const double clipTemplateActiveOffset,
507 const std::string& clipSet);
508
512 USD_API
513 bool SetClipTemplateActiveOffset(const double clipTemplateActiveOffset);
514
517 USD_API
518 bool GetClipTemplateActiveOffset(double* clipTemplateActiveOffset,
519 const std::string& clipSet) const;
520
524 USD_API
525 bool GetClipTemplateActiveOffset(double* clipTemplateActiveOffset) const;
526
529 USD_API
530 bool SetClipTemplateStride(const double clipTemplateStride,
531 const std::string& clipSet);
535 USD_API
536 bool SetClipTemplateStride(const double clipTemplateStride);
537
542 USD_API
543 bool GetClipTemplateStartTime(double* clipTemplateStartTime,
544 const std::string& clipSet) const;
548 USD_API
549 bool GetClipTemplateStartTime(double* clipTemplateStartTime) const;
550
553 USD_API
554 bool SetClipTemplateStartTime(const double clipTemplateStartTime,
555 const std::string& clipSet);
559 USD_API
560 bool SetClipTemplateStartTime(const double clipTemplateStartTime);
561
566 USD_API
567 bool GetClipTemplateEndTime(double* clipTemplateEndTime,
568 const std::string& clipSet) const;
572 USD_API
573 bool GetClipTemplateEndTime(double* clipTemplateEndTime) const;
574
577 USD_API
578 bool SetClipTemplateEndTime(const double clipTemplateEndTime,
579 const std::string& clipSet);
583 USD_API
584 bool SetClipTemplateEndTime(const double clipTemplateEndTime);
585
587
588};
589
591#define USDCLIPS_INFO_KEYS \
592 (active) \
593 (assetPaths) \
594 (interpolateMissingClipValues) \
595 (manifestAssetPath) \
596 (primPath) \
597 (templateAssetPath) \
598 (templateEndTime) \
599 (templateStartTime) \
600 (templateStride) \
601 (templateActiveOffset) \
602 (times) \
603
624TF_DECLARE_PUBLIC_TOKENS(UsdClipsAPIInfoKeys, USD_API, USDCLIPS_INFO_KEYS);
625
627#define USDCLIPS_SET_NAMES \
628 ((default_, "default")) \
629
638TF_DECLARE_PUBLIC_TOKENS(UsdClipsAPISetNames, USD_API, USDCLIPS_SET_NAMES);
639
640PXR_NAMESPACE_CLOSE_SCOPE
641
642#endif
Contains an asset path and optional evaluated and resolved paths.
Definition assetPath.h:79
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
TfType represents a dynamic runtime type.
Definition type.h:48
The base class for all API schemas.
UsdClipsAPI is an API schema that provides an interface to a prim's clip metadata.
Definition clipsAPI.h:89
USD_API bool SetClipTemplateEndTime(const double clipTemplateEndTime, const std::string &clipSet)
Set the template end time for the clipset named clipSet.
USD_API bool SetClipTimes(const VtVec2dArray &clipTimes)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipTemplateStride(double *clipTemplateStride) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API SdfLayerRefPtr GenerateClipManifest(const std::string &clipSet, bool writeBlocksForClipsWithMissingValues=false) const
Create a clip manifest containing entries for all attributes in the value clips for clip set clipSet.
USD_API bool SetClipTemplateStride(const double clipTemplateStride)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static USD_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition clipsAPI.h:94
USD_API bool SetClipPrimPath(const std::string &primPath, const std::string &clipSet)
Set the clip prim path for the clip set named clipSet.
USD_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static USD_API UsdClipsAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdClipsAPI holding the prim adhering to this schema at path on stage.
USD_API bool SetClipTemplateAssetPath(const std::string &clipTemplateAssetPath, const std::string &clipSet)
Set the clip template asset path for the clip set named clipSet.
USD_API bool GetClipPrimPath(std::string *primPath, const std::string &clipSet) const
Path to the prim in the clips in the clip set named clipSet from which time samples will be read.
USD_API bool GetClipTimes(VtVec2dArray *clipTimes, const std::string &clipSet) const
List of pairs (stage time, clip time) indicating the time in the active clip in the clip set named cl...
USD_API bool SetClipTimes(const VtVec2dArray &clipTimes, const std::string &clipSet)
Set the clip times metadata for this prim.
USD_API bool SetClipTemplateStride(const double clipTemplateStride, const std::string &clipSet)
Set the template stride for the clip set named clipSet.
USD_API bool SetClipTemplateActiveOffset(const double clipTemplateActiveOffset, const std::string &clipSet)
Set the clip template offset for the clip set named clipSet.
static USD_API SdfLayerRefPtr GenerateClipManifestFromLayers(const SdfLayerHandleVector &clipLayers, const SdfPath &clipPrimPath)
Create a clip manifest containing entries for all attributes in the given clipLayers that belong to t...
USD_API bool GetClipTemplateStartTime(double *clipTemplateStartTime, const std::string &clipSet) const
A double which indicates the start of the range USD will use to search for asset paths for the clip s...
USD_API bool SetClipActive(const VtVec2dArray &activeClips)
This is an overloaded member function, provided for convenience. It differs from the above function o...
UsdClipsAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdClipsAPI on UsdPrim prim .
Definition clipsAPI.h:100
USD_API SdfLayerRefPtr GenerateClipManifest(bool writeBlocksForClipsWithMissingValues=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
UsdClipsAPI(const UsdSchemaBase &schemaObj)
Construct a UsdClipsAPI on the prim held by schemaObj .
Definition clipsAPI.h:108
USD_API bool GetClipTemplateStride(double *clipTemplateStride, const std::string &clipSet) const
A double representing the increment value USD will use when searching for asset paths for the clip se...
USD_API bool SetClipTemplateEndTime(const double clipTemplateEndTime)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipTemplateAssetPath(std::string *clipTemplateAssetPath, const std::string &clipSet) const
A template string representing a set of assets to be used as clips for the clip set named clipSet.
USD_API bool SetClipTemplateStartTime(const double clipTemplateStartTime, const std::string &clipSet)
Set the template start time for the clip set named clipSet.
USD_API bool SetClipAssetPaths(const VtArray< SdfAssetPath > &assetPaths)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClips(VtDictionary *clips) const
Dictionary that contains the definition of the clip sets on this prim.
USD_API bool SetInterpolateMissingClipValues(bool interpolate)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API VtArray< SdfAssetPath > ComputeClipAssetPaths(const std::string &clipSet) const
Computes and resolves the list of clip asset paths used by the clip set named clipSet.
USD_API bool SetClips(const VtDictionary &clips)
Set the clips dictionary for this prim.
USD_API bool GetClipTemplateEndTime(double *clipTemplateEndTime, const std::string &clipSet) const
A double which indicates the end of the range USD will use to to search for asset paths for the clip ...
USD_API bool GetClipManifestAssetPath(SdfAssetPath *manifestAssetPath) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool SetInterpolateMissingClipValues(bool interpolate, const std::string &clipSet)
Set whether missing clip values are interpolated from surrounding clips.
USD_API bool GetClipPrimPath(std::string *primPath) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool SetClipSets(const SdfStringListOp &clipSets)
Set the clip sets list op for this prim.
USD_API bool SetClipManifestAssetPath(const SdfAssetPath &manifestAssetPath)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetInterpolateMissingClipValues(bool *interpolate) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool SetClipTemplateAssetPath(const std::string &clipTemplateAssetPath)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool SetClipTemplateActiveOffset(const double clipTemplateActiveOffset)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual USD_API ~UsdClipsAPI()
Destructor.
USD_API bool SetClipTemplateStartTime(const double clipTemplateStartTime)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipManifestAssetPath(SdfAssetPath *manifestAssetPath, const std::string &clipSet) const
Asset path for the clip manifest for the clip set named clipSet.
USD_API bool GetClipTemplateAssetPath(std::string *clipTemplateAssetPath) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool SetClipManifestAssetPath(const SdfAssetPath &manifestAssetPath, const std::string &clipSet)
Set the clip manifest asset path for this prim.
USD_API bool GetClipTimes(VtVec2dArray *clipTimes) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipTemplateActiveOffset(double *clipTemplateActiveOffset) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipAssetPaths(VtArray< SdfAssetPath > *assetPaths, const std::string &clipSet) const
List of asset paths to the clips in the clip set named clipSet.
USD_API bool SetClipAssetPaths(const VtArray< SdfAssetPath > &assetPaths, const std::string &clipSet)
Set the clip asset paths for the clip set named clipSet.
USD_API bool GetClipActive(VtVec2dArray *activeClips, const std::string &clipSet) const
List of pairs (time, clip index) indicating the time on the stage at which the clip in the clip set n...
USD_API bool GetClipTemplateStartTime(double *clipTemplateStartTime) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipSets(SdfStringListOp *clipSets) const
ListOp that may be used to affect how opinions from clip sets are applied during value resolution.
USD_API bool GetClipActive(VtVec2dArray *activeClips) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipTemplateEndTime(double *clipTemplateEndTime) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool SetClipActive(const VtVec2dArray &activeClips, const std::string &clipSet)
Set the active clip metadata for the clip set named clipSet.
USD_API bool SetClipPrimPath(const std::string &primPath)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API VtArray< SdfAssetPath > ComputeClipAssetPaths() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool GetClipTemplateActiveOffset(double *clipTemplateActiveOffset, const std::string &clipSet) const
A double representing the offset value used by USD when determining the active period for each clip.
USD_API bool GetClipAssetPaths(VtArray< SdfAssetPath > *assetPaths) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition prim.h:117
The base class for all schema types in Usd.
Definition schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Represents an arbitrary dimensional rectangular container class.
Definition array.h:213
A map with string keys and VtValue values.
Definition dictionary.h:52
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition common.h:112
@ NonAppliedAPI
Non-applied API schema.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition token.h:489