Loading...
Searching...
No Matches
authorshipAPI.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 USDMEDIA_GENERATED_AUTHORSHIPAPI_H
8#define USDMEDIA_GENERATED_AUTHORSHIPAPI_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdMedia/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.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// AUTHORSHIPAPI //
34// -------------------------------------------------------------------------- //
35
60{
61public:
66
77 const UsdPrim& prim=UsdPrim(), const TfToken &name=TfToken())
78 : UsdAPISchemaBase(prim, /*instanceName*/ name)
79 { }
80
86 const UsdSchemaBase& schemaObj, const TfToken &name)
87 : UsdAPISchemaBase(schemaObj, /*instanceName*/ name)
88 { }
89
91 USDMEDIA_API
93
97 USDMEDIA_API
98 static const TfTokenVector &
99 GetSchemaAttributeNames(bool includeInherited=true);
100
106 USDMEDIA_API
107 static TfTokenVector
108 GetSchemaAttributeNames(bool includeInherited, const TfToken &instanceName);
109
111 TfToken GetName() const {
112 return _GetInstanceName();
113 }
114
129 USDMEDIA_API
131 Get(const UsdStagePtr &stage, const SdfPath &path);
132
135 USDMEDIA_API
137 Get(const UsdPrim &prim, const TfToken &name);
138
141 USDMEDIA_API
142 static std::vector<UsdMediaAuthorshipAPI>
143 GetAll(const UsdPrim &prim);
144
147 USDMEDIA_API
148 static bool
150
154 USDMEDIA_API
155 static bool
157
174 USDMEDIA_API
175 static bool
176 CanApply(const UsdPrim &prim, const TfToken &name,
177 std::string *whyNot=nullptr);
178
198 USDMEDIA_API
200 Apply(const UsdPrim &prim, const TfToken &name);
201
202protected:
206 USDMEDIA_API
208
209private:
210 // needs to invoke _GetStaticTfType.
211 friend class UsdSchemaRegistry;
212 USDMEDIA_API
213 static const TfType &_GetStaticTfType();
214
215 static bool _IsTypedSchema();
216
217 // override SchemaBase virtuals.
218 USDMEDIA_API
219 const TfType &_GetTfType() const override;
220
221public:
222 // --------------------------------------------------------------------- //
223 // SOFTWAREPACKAGE
224 // --------------------------------------------------------------------- //
242 USDMEDIA_API
244
250 USDMEDIA_API
251 UsdAttribute CreateSoftwarePackageAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
252
253public:
254 // --------------------------------------------------------------------- //
255 // SOFTWAREVERSION
256 // --------------------------------------------------------------------- //
268 USDMEDIA_API
270
276 USDMEDIA_API
277 UsdAttribute CreateSoftwareVersionAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
278
279public:
280 // --------------------------------------------------------------------- //
281 // DIGITALSOURCETYPE
282 // --------------------------------------------------------------------- //
297 USDMEDIA_API
299
305 USDMEDIA_API
306 UsdAttribute CreateDigitalSourceTypeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
307
308public:
309 // --------------------------------------------------------------------- //
310 // CREATOR
311 // --------------------------------------------------------------------- //
322 USDMEDIA_API
324
330 USDMEDIA_API
331 UsdAttribute CreateCreatorAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
332
333public:
334 // --------------------------------------------------------------------- //
335 // DESCRIPTION
336 // --------------------------------------------------------------------- //
347 USDMEDIA_API
349
355 USDMEDIA_API
356 UsdAttribute CreateDescriptionAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
357
358public:
359 // --------------------------------------------------------------------- //
360 // INPUTS
361 // --------------------------------------------------------------------- //
379 USDMEDIA_API
381
387 USDMEDIA_API
388 UsdAttribute CreateInputsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
389
390public:
391 // --------------------------------------------------------------------- //
392 // CREATED
393 // --------------------------------------------------------------------- //
404 USDMEDIA_API
406
412 USDMEDIA_API
413 UsdAttribute CreateCreatedAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
414
415public:
416 // --------------------------------------------------------------------- //
417 // INSTANCEID
418 // --------------------------------------------------------------------- //
439 USDMEDIA_API
441
447 USDMEDIA_API
448 UsdAttribute CreateInstanceIDAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
449
450public:
451 // --------------------------------------------------------------------- //
452 // USAGETERMS
453 // --------------------------------------------------------------------- //
468 USDMEDIA_API
470
476 USDMEDIA_API
477 UsdAttribute CreateUsageTermsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
478
479public:
480 // --------------------------------------------------------------------- //
481 // COPYRIGHTOWNER
482 // --------------------------------------------------------------------- //
493 USDMEDIA_API
495
501 USDMEDIA_API
502 UsdAttribute CreateCopyrightOwnerAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
503
504public:
505 // --------------------------------------------------------------------- //
506 // CONTACT
507 // --------------------------------------------------------------------- //
517 USDMEDIA_API
519
525 USDMEDIA_API
526 UsdAttribute CreateContactAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
527
528public:
529 // ===================================================================== //
530 // Feel free to add custom code below this line, it will be preserved by
531 // the code generator.
532 //
533 // Just remember to:
534 // - Close the class declaration with };
535 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
536 // - Close the include guard with #endif
537 // ===================================================================== //
538 // --(BEGIN CUSTOM CODE)--
539
554 USDMEDIA_API
555 static std::vector<UsdMediaAuthorshipAPI>
556 GetAllOnStage(const UsdStagePtr &stage);
557
570 USDMEDIA_API
571 static std::vector<UsdMediaAuthorshipAPI>
573
580 USDMEDIA_API
581 static std::vector<UsdMediaAuthorshipAPI>
582 GetAllUnder(const UsdPrim &prim);
583
598
604 USDMEDIA_API
605 static std::vector<UsdMediaAuthorshipAPI>
606 GetShadowed(const UsdPrim &prim);
607
612 USDMEDIA_API
613 static std::vector<UsdMediaAuthorshipAPI>
614 GetDuplicates(const UsdPrim &prim);
615
621 USDMEDIA_API
622 static std::vector<UsdMediaAuthorshipAPI>
623 GetAllShadowed(const UsdStagePtr &stage);
624
631 USDMEDIA_API
632 static std::vector<UsdMediaAuthorshipAPI>
633 GetAllDuplicates(const UsdStagePtr &stage);
634
636
657 USDMEDIA_API
658 static SdfPathVector
659 GetAllInLayer(const SdfLayerHandle &layer);
660};
661
662PXR_NAMESPACE_CLOSE_SCOPE
663
664#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
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
TfType represents a dynamic runtime type.
Definition type.h:48
The base class for all API schemas.
const TfToken & _GetInstanceName() const
Returns the instance name of the API schema object belonging to a multiple-apply API schema.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition attribute.h:183
Records who or what authored a prim.
USDMEDIA_API UsdAttribute CreateDescriptionAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDescriptionAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute GetSoftwarePackageAttr() const
The tool or system that most directly wrote the USD data for this prim.
static USDMEDIA_API bool IsSchemaPropertyBaseName(const TfToken &baseName)
Checks if the given name baseName is the base name of a property of AuthorshipAPI.
static USDMEDIA_API UsdMediaAuthorshipAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdMediaAuthorshipAPI holding the prim adhering to this schema at path on stage.
USDMEDIA_API UsdAttribute GetSoftwareVersionAttr() const
The version of the softwarePackage that created this record, not of the asset.
TfToken GetName() const
Returns the name of this multiple-apply schema instance.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
static USDMEDIA_API TfTokenVector GetSchemaAttributeNames(bool includeInherited, const TfToken &instanceName)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
static USDMEDIA_API bool IsAuthorshipAPIPath(const SdfPath &path, TfToken *name)
Checks if the given path path is of an API schema of type AuthorshipAPI.
USDMEDIA_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
virtual USDMEDIA_API ~UsdMediaAuthorshipAPI()
Destructor.
USDMEDIA_API UsdAttribute CreateDigitalSourceTypeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDigitalSourceTypeAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDMEDIA_API UsdAttribute GetInstanceIDAttr() const
A unique identifier for this run's output, such as a single generative AI result.
USDMEDIA_API UsdAttribute CreateCreatedAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCreatedAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdMediaAuthorshipAPI(const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken())
Construct a UsdMediaAuthorshipAPI on UsdPrim prim with name name .
static USDMEDIA_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 USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > GetShadowed(const UsdPrim &prim)
Returns the records applied in some spec of prim's prim stack that the composed prim does not report,...
static USDMEDIA_API UsdMediaAuthorshipAPI Apply(const UsdPrim &prim, const TfToken &name)
Applies this multiple-apply API schema to the given prim along with the given instance name,...
static USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > GetAllDuplicates(const UsdStagePtr &stage)
Returns GetDuplicates() for every prim on stage, sorted by prim path then instance name.
static USDMEDIA_API bool CanApply(const UsdPrim &prim, const TfToken &name, std::string *whyNot=nullptr)
Returns true if this multiple-apply API schema can be applied, with the given instance name,...
static USDMEDIA_API UsdMediaAuthorshipAPI Get(const UsdPrim &prim, const TfToken &name)
Return a UsdMediaAuthorshipAPI with name name holding the prim prim.
UsdMediaAuthorshipAPI(const UsdSchemaBase &schemaObj, const TfToken &name)
Construct a UsdMediaAuthorshipAPI on the prim held by schemaObj with name name.
USDMEDIA_API UsdAttribute CreateUsageTermsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetUsageTermsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > ComputeAccumulatedRecords(const UsdPrim &prim)
Returns the records that apply to prim: its own plus those accumulated from its ancestors,...
static USDMEDIA_API SdfPathVector GetAllInLayer(const SdfLayerHandle &layer)
Returns the path of every authorship record authored in layer, sorted, in the <specPath>....
USDMEDIA_API UsdAttribute GetDigitalSourceTypeAttr() const
A URI describing the nature of the creative process, such as whether the content is human-made or AI-...
USDMEDIA_API UsdAttribute CreateInstanceIDAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetInstanceIDAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute GetCopyrightOwnerAttr() const
Entities holding copyright in this content, which may differ from creator (e.g., a studio owning an a...
static USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > GetDuplicates(const UsdPrim &prim)
Returns the records whose application is authored in more than one spec of prim's prim stack,...
static USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > GetAllOnStage(const UsdStagePtr &stage)
Returns every authorship record on stage, sorted by prim path then instance name.
USDMEDIA_API UsdAttribute GetInputsAttr() const
The inputs that shaped this authoring step, as flattened (name, value) pairs.
static USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > GetAllUnder(const UsdPrim &prim)
Returns the records on prim and everything beneath it, sorted by prim path then instance name.
USDMEDIA_API UsdAttribute CreateSoftwareVersionAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSoftwareVersionAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute GetContactAttr() const
Contact information for inquiries about this asset, such as an email address, support URL,...
USDMEDIA_API UsdAttribute CreateCopyrightOwnerAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCopyrightOwnerAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute GetUsageTermsAttr() const
The license or usage terms for this asset.
static USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > GetAllShadowed(const UsdStagePtr &stage)
Returns GetShadowed() for every prim on stage, sorted by prim path then instance name.
USDMEDIA_API UsdAttribute GetDescriptionAttr() const
Free-form description of how the prim was created.
USDMEDIA_API UsdAttribute GetCreatorAttr() const
Human-readable names of the artists, studios, or services that contributed to this authoring step.
USDMEDIA_API UsdAttribute CreateSoftwarePackageAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSoftwarePackageAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute CreateContactAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetContactAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute GetCreatedAttr() const
An ISO 8601 timestamp indicating when this authoring step occurred (e.g., 2025-02-16T12:03:17+01:00),...
static USDMEDIA_API std::vector< UsdMediaAuthorshipAPI > GetAll(const UsdPrim &prim)
Return a vector of all named instances of UsdMediaAuthorshipAPI on the given prim.
USDMEDIA_API UsdAttribute CreateInputsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetInputsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute CreateCreatorAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCreatorAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
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...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition value.h:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition common.h:112
@ MultipleApplyAPI
Multiple Apply API Schema.
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