HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
commandSettingsAPI.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 USDKARMA_GENERATED_COMMANDSETTINGSAPI_H
25 #define USDKARMA_GENERATED_COMMANDSETTINGSAPI_H
26 
27 /// \file usdKarma/commandSettingsAPI.h
28 
29 #include "pxr/pxr.h"
30 #include ".//api.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 #include ".//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 // KARMACOMMANDSETTINGSAPI //
51 // -------------------------------------------------------------------------- //
52 
53 /// \class usdKarmaCommandSettingsAPI
54 ///
55 ///
56 class
59 {
60 public:
61  /// Compile time constant representing what kind of schema this class is.
62  ///
63  /// \sa UsdSchemaType
64  static const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI;
65 
66  /// Construct a usdKarmaCommandSettingsAPI on UsdPrim \p prim .
67  /// Equivalent to usdKarmaCommandSettingsAPI::Get(prim.GetStage(), prim.GetPath())
68  /// for a \em valid \p prim, but will not immediately throw an error for
69  /// an invalid \p prim
70  explicit usdKarmaCommandSettingsAPI(const UsdPrim& prim=UsdPrim())
71  : UsdAPISchemaBase(prim)
72  {
73  }
74 
75  /// Construct a usdKarmaCommandSettingsAPI on the prim held by \p schemaObj .
76  /// Should be preferred over usdKarmaCommandSettingsAPI(schemaObj.GetPrim()),
77  /// as it preserves SchemaBase state.
78  explicit usdKarmaCommandSettingsAPI(const UsdSchemaBase& schemaObj)
79  : UsdAPISchemaBase(schemaObj)
80  {
81  }
82 
83  /// Destructor.
84  virtual ~usdKarmaCommandSettingsAPI();
85 
86  /// Return a vector of names of all pre-declared attributes for this schema
87  /// class and all its ancestor classes. Does not include attributes that
88  /// may be authored by custom/extended methods of the schemas involved.
89  static const TfTokenVector &
90  GetSchemaAttributeNames(bool includeInherited=true);
91 
92  /// Return a usdKarmaCommandSettingsAPI holding the prim adhering to this
93  /// schema at \p path on \p stage. If no prim exists at \p path on
94  /// \p stage, or if the prim at that path does not adhere to this schema,
95  /// return an invalid schema object. This is shorthand for the following:
96  ///
97  /// \code
98  /// usdKarmaCommandSettingsAPI(stage->GetPrimAtPath(path));
99  /// \endcode
100  ///
102  Get(const UsdStagePtr &stage, const SdfPath &path);
103 
104 
105  /// Applies this <b>single-apply</b> API schema to the given \p prim.
106  /// This information is stored by adding "KarmaCommandSettingsAPI" to the
107  /// token-valued, listOp metadata \em apiSchemas on the prim.
108  ///
109  /// \return A valid usdKarmaCommandSettingsAPI object is returned upon success.
110  /// An invalid (or empty) usdKarmaCommandSettingsAPI object is returned upon
111  /// failure. See \ref UsdAPISchemaBase::_ApplyAPISchema() for conditions
112  /// resulting in failure.
113  ///
114  /// \sa UsdPrim::GetAppliedSchemas()
115  /// \sa UsdPrim::HasAPI()
116  ///
118  Apply(const UsdPrim &prim);
119 
120 protected:
121  /// Returns the type of schema this class belongs to.
122  ///
123  /// \sa UsdSchemaType
124  virtual UsdSchemaType _GetSchemaType() const;
125 
126 private:
127  // needs to invoke _GetStaticTfType.
128  friend class UsdSchemaRegistry;
129  static const TfType &_GetStaticTfType();
130 
131  static bool _IsTypedSchema();
132 
133  // override SchemaBase virtuals.
134  virtual const TfType &_GetTfType() const;
135 
136 public:
137  // --------------------------------------------------------------------- //
138  // KARMACOMMANDCHECKPOINT
139  // --------------------------------------------------------------------- //
140  /// The time between checkpointing of partial results.
141  ///
142  /// \n C++ Type: int
143  /// \n Usd Type: SdfValueTypeNames->Int
144  /// \n Variability: SdfVariabilityVarying
145  /// \n Fallback Value: -1
146  UsdAttribute GetKarmaCommandCheckpointAttr() const;
147 
148  /// See GetKarmaCommandCheckpointAttr(), and also
149  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
150  /// If specified, author \p defaultValue as the attribute's default,
151  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
152  /// the default for \p writeSparsely is \c false.
153  UsdAttribute CreateKarmaCommandCheckpointAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
154 
155 public:
156  // --------------------------------------------------------------------- //
157  // KARMACOMMANDFRAME
158  // --------------------------------------------------------------------- //
159  /// The start frame to render.
160  ///
161  /// \n C++ Type: float
162  /// \n Usd Type: SdfValueTypeNames->Float
163  /// \n Variability: SdfVariabilityVarying
164  /// \n Fallback Value: 1.0
165  UsdAttribute GetKarmaCommandFrameAttr() const;
166 
167  /// See GetKarmaCommandFrameAttr(), and also
168  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
169  /// If specified, author \p defaultValue as the attribute's default,
170  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
171  /// the default for \p writeSparsely is \c false.
172  UsdAttribute CreateKarmaCommandFrameAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
173 
174 public:
175  // --------------------------------------------------------------------- //
176  // KARMACOMMANDFRAME_COUNT
177  // --------------------------------------------------------------------- //
178  /// The number of frames to render.
179  ///
180  /// \n C++ Type: int
181  /// \n Usd Type: SdfValueTypeNames->Int
182  /// \n Variability: SdfVariabilityVarying
183  /// \n Fallback Value: 1
184  UsdAttribute GetKarmaCommandFrame_countAttr() const;
185 
186  /// See GetKarmaCommandFrame_countAttr(), and also
187  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
188  /// If specified, author \p defaultValue as the attribute's default,
189  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
190  /// the default for \p writeSparsely is \c false.
191  UsdAttribute CreateKarmaCommandFrame_countAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
192 
193 public:
194  // --------------------------------------------------------------------- //
195  // KARMACOMMANDFRAME_INC
196  // --------------------------------------------------------------------- //
197  /// When rendering multiple frames (see frame_count), this specifies the
198  /// frame increment for each subsequent frame.
199  ///
200  /// \n C++ Type: float
201  /// \n Usd Type: SdfValueTypeNames->Float
202  /// \n Variability: SdfVariabilityVarying
203  /// \n Fallback Value: 1.0
204  UsdAttribute GetKarmaCommandFrame_incAttr() const;
205 
206  /// See GetKarmaCommandFrame_incAttr(), and also
207  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
208  /// If specified, author \p defaultValue as the attribute's default,
209  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
210  /// the default for \p writeSparsely is \c false.
211  UsdAttribute CreateKarmaCommandFrame_incAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
212 
213 public:
214  // --------------------------------------------------------------------- //
215  // KARMACOMMANDTIMELIMIT
216  // --------------------------------------------------------------------- //
217  /// Limit rendering to this number of seconds.
218  ///
219  /// \n C++ Type: int
220  /// \n Usd Type: SdfValueTypeNames->Int
221  /// \n Variability: SdfVariabilityVarying
222  /// \n Fallback Value: -1
223  UsdAttribute GetKarmaCommandTimelimitAttr() const;
224 
225  /// See GetKarmaCommandTimelimitAttr(), and also
226  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
227  /// If specified, author \p defaultValue as the attribute's default,
228  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
229  /// the default for \p writeSparsely is \c false.
230  UsdAttribute CreateKarmaCommandTimelimitAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
231 
232 public:
233  // --------------------------------------------------------------------- //
234  // KARMACOMMANDTIMELIMIT_IMAGE
235  // --------------------------------------------------------------------- //
236  /// The render time limit is applied per image in a sequence rather than to the
237  /// full render.
238  ///
239  /// \n C++ Type: bool
240  /// \n Usd Type: SdfValueTypeNames->Bool
241  /// \n Variability: SdfVariabilityVarying
242  /// \n Fallback Value: False
243  UsdAttribute GetKarmaCommandTimelimit_imageAttr() const;
244 
245  /// See GetKarmaCommandTimelimit_imageAttr(), and also
246  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
247  /// If specified, author \p defaultValue as the attribute's default,
248  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
249  /// the default for \p writeSparsely is \c false.
250  UsdAttribute CreateKarmaCommandTimelimit_imageAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
251 
252 public:
253  // --------------------------------------------------------------------- //
254  // KARMACOMMANDTIMELIMIT_NOSAVE_PARTIAL
255  // --------------------------------------------------------------------- //
256  /// Normally, if the render time limit is exceeded, the partial image will be
257  /// saved. If this option is disabled, a partial image will not be saved.
258  ///
259  /// \n C++ Type: bool
260  /// \n Usd Type: SdfValueTypeNames->Bool
261  /// \n Variability: SdfVariabilityVarying
262  /// \n Fallback Value: False
263  UsdAttribute GetKarmaCommandTimelimit_nosave_partialAttr() const;
264 
265  /// See GetKarmaCommandTimelimit_nosave_partialAttr(), and also
266  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
267  /// If specified, author \p defaultValue as the attribute's default,
268  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
269  /// the default for \p writeSparsely is \c false.
270  UsdAttribute CreateKarmaCommandTimelimit_nosave_partialAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
271 
272 public:
273  // ===================================================================== //
274  // Feel free to add custom code below this line, it will be preserved by
275  // the code generator.
276  //
277  // Just remember to:
278  // - Close the class declaration with };
279  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
280  // - Close the include guard with #endif
281  // ===================================================================== //
282  // --(BEGIN CUSTOM CODE)--
283 };
284 
286 
287 #endif
#define USDKARMA_API
Definition: api.h:45
usdKarmaCommandSettingsAPI(const UsdPrim &prim=UsdPrim())
usdKarmaCommandSettingsAPI(const UsdSchemaBase &schemaObj)
UsdSchemaType
Definition: common.h:149
Definition: prim.h:131
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:438
Single Apply API schema.
Definition: path.h:287
GLsizei const GLchar *const * path
Definition: glew.h:6461
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1245
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:83
Definition: type.h:70
Definition: value.h:182