All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
modelSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_USD_IMAGING_USD_IMAGING_MODEL_SCHEMA_H
19#define PXR_USD_IMAGING_USD_IMAGING_MODEL_SCHEMA_H
20
22
23#include "pxr/usdImaging/usdImaging/api.h"
24
25#include "pxr/imaging/hd/schema.h"
26
27// --(BEGIN CUSTOM CODE: Includes)--
28// --(END CUSTOM CODE: Includes)--
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32// --(BEGIN CUSTOM CODE: Declares)--
33// --(END CUSTOM CODE: Declares)--
34
35#define USD_IMAGING_MODEL_SCHEMA_TOKENS \
36 (model) \
37 (modelPath) \
38 (assetIdentifier) \
39 (assetName) \
40 (assetVersion) \
41
42TF_DECLARE_PUBLIC_TOKENS(UsdImagingModelSchemaTokens, USDIMAGING_API,
43 USD_IMAGING_MODEL_SCHEMA_TOKENS);
44
45//-----------------------------------------------------------------------------
46
47
48class UsdImagingModelSchema : public HdSchema
49{
50public:
53
54 UsdImagingModelSchema(HdContainerDataSourceHandle container)
55 : HdSchema(container) {}
56
62 USDIMAGING_API
63 static UsdImagingModelSchema GetFromParent(
64 const HdContainerDataSourceHandle &fromParentContainer);
65
67
68// --(BEGIN CUSTOM CODE: Schema Methods)--
69// --(END CUSTOM CODE: Schema Methods)--
70
73
74 USDIMAGING_API
75 HdPathDataSourceHandle GetModelPath() const;
76
77 USDIMAGING_API
78 HdAssetPathDataSourceHandle GetAssetIdentifier() const;
79
80 USDIMAGING_API
81 HdStringDataSourceHandle GetAssetName() const;
82
83 USDIMAGING_API
84 HdStringDataSourceHandle GetAssetVersion() const;
85
87
90
93 USDIMAGING_API
94 static const TfToken &GetSchemaToken();
95
98 USDIMAGING_API
99 static const HdDataSourceLocator &GetDefaultLocator();
100
102
105
113 USDIMAGING_API
114 static HdContainerDataSourceHandle
115 BuildRetained(
116 const HdPathDataSourceHandle &modelPath,
117 const HdAssetPathDataSourceHandle &assetIdentifier,
118 const HdStringDataSourceHandle &assetName,
119 const HdStringDataSourceHandle &assetVersion
120 );
121
129 {
130 public:
131 USDIMAGING_API
132 Builder &SetModelPath(
133 const HdPathDataSourceHandle &modelPath);
134 USDIMAGING_API
135 Builder &SetAssetIdentifier(
136 const HdAssetPathDataSourceHandle &assetIdentifier);
137 USDIMAGING_API
138 Builder &SetAssetName(
139 const HdStringDataSourceHandle &assetName);
140 USDIMAGING_API
141 Builder &SetAssetVersion(
142 const HdStringDataSourceHandle &assetVersion);
143
145 USDIMAGING_API
146 HdContainerDataSourceHandle Build();
147
148 private:
149 HdPathDataSourceHandle _modelPath;
150 HdAssetPathDataSourceHandle _assetIdentifier;
151 HdStringDataSourceHandle _assetName;
152 HdStringDataSourceHandle _assetVersion;
153
154 };
155
157};
158
159PXR_NAMESPACE_CLOSE_SCOPE
160
161#endif
Represents an object that can identify the location of a data source.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: modelSchema.h:129
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:81