HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
collectionAPI.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_COLLECTIONAPI_H
25 #define USD_GENERATED_COLLECTIONAPI_H
26 
27 /// \file usd/collectionAPI.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 
37 #include "pxr/usd/usd/primFlags.h"
38 #include "pxr/usd/usd/tokens.h"
39 
40 
41 #include "pxr/base/vt/value.h"
42 
43 #include "pxr/base/gf/vec3d.h"
44 #include "pxr/base/gf/vec3f.h"
45 #include "pxr/base/gf/matrix4d.h"
46 
47 #include "pxr/base/tf/token.h"
48 #include "pxr/base/tf/type.h"
49 
51 
52 class SdfAssetPath;
53 
54 // -------------------------------------------------------------------------- //
55 // COLLECTIONAPI //
56 // -------------------------------------------------------------------------- //
57 
58 /// \class UsdCollectionAPI
59 ///
60 /// This is a general purpose API schema, used to describe a
61 /// collection of heterogeneous objects within the scene. "Objects" here may be
62 /// prims or properties belonging to prims or other collections. It's an add-on
63 /// schema that can be applied many times to a prim with different collection
64 /// names.
65 ///
66 /// A collection allows an enumeration of a set of paths to include and a
67 /// set of paths to exclude. Whether the descendants of an included
68 /// path are members of a collection are decided by its expansion rule
69 /// (see below). If the collection excludes paths that are not descendents
70 /// of included paths, the collection implicitly includes the root path
71 /// </>. If such a collection also includes paths that are not
72 /// descendants of the excluded paths, it is considered invalid, since
73 /// the intention is ambiguous.
74 ///
75 /// All the properties authored by the schema are namespaced under
76 /// "collection:". The given name of the collection provides additional
77 /// namespacing for the various per-collection properties, which include the
78 /// following:
79 ///
80 /// <ul><li><b>uniform token collection:<i>collectionName</i>:expansionRule</b> -
81 /// specified how the paths that are included in the collection must be expanded
82 /// to determine its members. Possible values include:
83 /// <ul>
84 /// <li><b>explicitOnly</b> - only paths in the includes rel targets and not
85 /// in the excludes rel targets belong to the collection.
86 /// </li>
87 /// <li><b>expandPrims</b> - all the prims at or below the includes rel-
88 /// targets (and not under the excludes rel-targets) belong to the
89 /// collection. Any property paths included in the collection would, of
90 /// course, also be honored. This is the default behavior as it satisfies
91 /// most use cases.
92 /// </li>
93 /// <li><b>expandPrimsAndProperties</b> - like expandPrims, but also
94 /// includes all properties on all matched prims. We're still not quite
95 /// sure what the use cases are for this, but you can use it to capture a
96 /// whole lot of UsdObjects very concisely.
97 /// </li>
98 /// </ul>
99 /// </li>
100 /// <li><b>bool collection:<i>collectionName</i>:includeRoot</b> - boolean
101 /// attribute indicating whether the pseudo-root path &lt;/&gt; should
102 /// be counted as one of the included target paths. The fallback is false.
103 /// This separate attribute is required because relationships cannot
104 /// directly target the root.
105 /// <li><b>rel collection:<i>collectionName</i>:includes</b> - specifies a list
106 /// of targets that are included in the collection. This can target prims or
107 /// properties directly. A collection can insert the rules of another
108 /// collection by making its <i>includes</i> relationship target the
109 /// <b>collection:{collectionName}</b> property on the owning prim of the
110 /// collection to be included.
111 /// Such a property may not (and typically does not) exist on the UsdStage, but
112 /// it is the path that is used to refer to the collection.
113 /// It is important to note that including another collection does not
114 /// guarantee the contents of that collection will be in the final collection;
115 /// instead, the rules are merged. This means, for example, an exclude
116 /// entry may exclude a portion of the included collection.
117 /// When a collection includes one or more collections, the order in which
118 /// targets are added to the includes relationship may become significant, if
119 /// there are conflicting opinions about the same path. Targets that are added
120 /// later are considered to be stronger than earlier targets for the same path.
121 /// </li>
122 /// <li><b>rel collection:<i>collectionName</i>:excludes</b> - specifies a list
123 /// of targets that are excluded below the <b>included</b> paths in this
124 /// collection. This can target prims or properties directly, but <b>cannot
125 /// target another collection</b>. This is to keep the membership determining
126 /// logic simple, efficient and easier to reason about. Finally, it is invalid
127 /// for a collection to exclude paths that are not included in it. The presence
128 /// of such "orphaned" excluded paths will not affect the set of paths included
129 /// in the collection, but may affect the performance of querying membership of
130 /// a path in the collection (see UsdCollectionAPI::MembershipQuery::IsPathIncluded)
131 /// or of enumerating the objects belonging to the collection (see
132 /// UsdCollectionAPI::GetIncludedObjects).
133 /// </li></ul>
134 ///
135 /// <b>Implicit inclusion</b>
136 ///
137 /// In some scenarios it is useful to express a collection that includes
138 /// everything except certain paths. To support this, a collection
139 /// that has an exclude that is not a descendent of any include
140 /// will include the root path &lt;/&gt;.
141 ///
142 /// <b>Creating collections in C++</b>
143 ///
144 /// \snippet examples.cpp ApplyCollections
145 ///
146 ///
147 /// For any described attribute \em Fallback \em Value or \em Allowed \em Values below
148 /// that are text/tokens, the actual token is published and defined in \ref UsdTokens.
149 /// So to set an attribute to the value "rightHanded", use UsdTokens->rightHanded
150 /// as the value.
151 ///
153 {
154 public:
155  /// Compile time constant representing what kind of schema this class is.
156  ///
157  /// \sa UsdSchemaKind
159 
160  /// Construct a UsdCollectionAPI on UsdPrim \p prim with
161  /// name \p name . Equivalent to
162  /// UsdCollectionAPI::Get(
163  /// prim.GetStage(),
164  /// prim.GetPath().AppendProperty(
165  /// "collection:name"));
166  ///
167  /// for a \em valid \p prim, but will not immediately throw an error for
168  /// an invalid \p prim
170  const UsdPrim& prim=UsdPrim(), const TfToken &name=TfToken())
171  : UsdAPISchemaBase(prim, /*instanceName*/ name)
172  { }
173 
174  /// Construct a UsdCollectionAPI on the prim held by \p schemaObj with
175  /// name \p name. Should be preferred over
176  /// UsdCollectionAPI(schemaObj.GetPrim(), name), as it preserves
177  /// SchemaBase state.
179  const UsdSchemaBase& schemaObj, const TfToken &name)
180  : UsdAPISchemaBase(schemaObj, /*instanceName*/ name)
181  { }
182 
183  /// Destructor.
184  USD_API
185  virtual ~UsdCollectionAPI();
186 
187  /// Return a vector of names of all pre-declared attributes for this schema
188  /// class and all its ancestor classes for a given instance name. Does not
189  /// include attributes that may be authored by custom/extended methods of
190  /// the schemas involved. The names returned will have the proper namespace
191  /// prefix.
192  USD_API
193  static const TfTokenVector &
195  bool includeInherited=true, const TfToken instanceName=TfToken());
196 
197  /// Returns the name of this multiple-apply schema instance
198  TfToken GetName() const {
199  return _GetInstanceName();
200  }
201 
202  /// Return a UsdCollectionAPI holding the prim adhering to this
203  /// schema at \p path on \p stage. If no prim exists at \p path on
204  /// \p stage, or if the prim at that path does not adhere to this schema,
205  /// return an invalid schema object. \p path must be of the format
206  /// <path>.collection:name .
207  ///
208  /// This is shorthand for the following:
209  ///
210  /// \code
211  /// TfToken name = SdfPath::StripNamespace(path.GetToken());
212  /// UsdCollectionAPI(
213  /// stage->GetPrimAtPath(path.GetPrimPath()), name);
214  /// \endcode
215  ///
216  USD_API
217  static UsdCollectionAPI
218  Get(const UsdStagePtr &stage, const SdfPath &path);
219 
220  /// Return a UsdCollectionAPI with name \p name holding the
221  /// prim \p prim. Shorthand for UsdCollectionAPI(prim, name);
222  USD_API
223  static UsdCollectionAPI
224  Get(const UsdPrim &prim, const TfToken &name);
225 
226  /// Checks if the given name \p baseName is the base name of a property
227  /// of CollectionAPI.
228  USD_API
229  static bool
230  IsSchemaPropertyBaseName(const TfToken &baseName);
231 
232  /// Checks if the given path \p path is of an API schema of type
233  /// CollectionAPI. If so, it stores the instance name of
234  /// the schema in \p name and returns true. Otherwise, it returns false.
235  USD_API
236  static bool
238 
239  /// Returns true if this <b>multiple-apply</b> API schema can be applied,
240  /// with the given instance name, \p name, to the given \p prim. If this
241  /// schema can not be a applied the prim, this returns false and, if
242  /// provided, populates \p whyNot with the reason it can not be applied.
243  ///
244  /// Note that if CanApply returns false, that does not necessarily imply
245  /// that calling Apply will fail. Callers are expected to call CanApply
246  /// before calling Apply if they want to ensure that it is valid to
247  /// apply a schema.
248  ///
249  /// \sa UsdPrim::GetAppliedSchemas()
250  /// \sa UsdPrim::HasAPI()
251  /// \sa UsdPrim::CanApplyAPI()
252  /// \sa UsdPrim::ApplyAPI()
253  /// \sa UsdPrim::RemoveAPI()
254  ///
255  USD_API
256  static bool
257  CanApply(const UsdPrim &prim, const TfToken &name,
258  std::string *whyNot=nullptr);
259 
260  /// Applies this <b>multiple-apply</b> API schema to the given \p prim
261  /// along with the given instance name, \p name.
262  ///
263  /// This information is stored by adding "CollectionAPI:<i>name</i>"
264  /// to the token-valued, listOp metadata \em apiSchemas on the prim.
265  /// For example, if \p name is 'instance1', the token
266  /// 'CollectionAPI:instance1' is added to 'apiSchemas'.
267  ///
268  /// \return A valid UsdCollectionAPI object is returned upon success.
269  /// An invalid (or empty) UsdCollectionAPI object is returned upon
270  /// failure. See \ref UsdPrim::ApplyAPI() for
271  /// conditions resulting in failure.
272  ///
273  /// \sa UsdPrim::GetAppliedSchemas()
274  /// \sa UsdPrim::HasAPI()
275  /// \sa UsdPrim::CanApplyAPI()
276  /// \sa UsdPrim::ApplyAPI()
277  /// \sa UsdPrim::RemoveAPI()
278  ///
279  USD_API
280  static UsdCollectionAPI
281  Apply(const UsdPrim &prim, const TfToken &name);
282 
283 protected:
284  /// Returns the kind of schema this class belongs to.
285  ///
286  /// \sa UsdSchemaKind
287  USD_API
288  UsdSchemaKind _GetSchemaKind() const override;
289 
290 private:
291  // needs to invoke _GetStaticTfType.
292  friend class UsdSchemaRegistry;
293  USD_API
294  static const TfType &_GetStaticTfType();
295 
296  static bool _IsTypedSchema();
297 
298  // override SchemaBase virtuals.
299  USD_API
300  const TfType &_GetTfType() const override;
301 
302 public:
303  // --------------------------------------------------------------------- //
304  // EXPANSIONRULE
305  // --------------------------------------------------------------------- //
306  /// Specifies how the paths that are included in
307  /// the collection must be expanded to determine its members.
308  ///
309  /// | ||
310  /// | -- | -- |
311  /// | Declaration | `uniform token expansionRule = "expandPrims"` |
312  /// | C++ Type | TfToken |
313  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
314  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
315  /// | \ref UsdTokens "Allowed Values" | explicitOnly, expandPrims, expandPrimsAndProperties |
316  USD_API
318 
319  /// See GetExpansionRuleAttr(), and also
320  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
321  /// If specified, author \p defaultValue as the attribute's default,
322  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
323  /// the default for \p writeSparsely is \c false.
324  USD_API
325  UsdAttribute CreateExpansionRuleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
326 
327 public:
328  // --------------------------------------------------------------------- //
329  // INCLUDEROOT
330  // --------------------------------------------------------------------- //
331  /// Boolean attribute indicating whether the pseudo-root
332  /// path &lt;/&gt; should be counted as one of the included target
333  /// paths. The fallback is false. This separate attribute is
334  /// required because relationships cannot directly target the root.
335  ///
336  /// | ||
337  /// | -- | -- |
338  /// | Declaration | `uniform bool includeRoot` |
339  /// | C++ Type | bool |
340  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
341  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
342  USD_API
344 
345  /// See GetIncludeRootAttr(), and also
346  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
347  /// If specified, author \p defaultValue as the attribute's default,
348  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
349  /// the default for \p writeSparsely is \c false.
350  USD_API
351  UsdAttribute CreateIncludeRootAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
352 
353 public:
354  // --------------------------------------------------------------------- //
355  // INCLUDES
356  // --------------------------------------------------------------------- //
357  /// Specifies a list of targets that are included in the collection.
358  /// This can target prims or properties directly. A collection can insert
359  /// the rules of another collection by making its <i>includes</i>
360  /// relationship target the <b>collection:{collectionName}</b> property on
361  /// the owning prim of the collection to be included
362  ///
363  USD_API
365 
366  /// See GetIncludesRel(), and also
367  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
368  USD_API
370 
371 public:
372  // --------------------------------------------------------------------- //
373  // EXCLUDES
374  // --------------------------------------------------------------------- //
375  /// Specifies a list of targets that are excluded below
376  /// the included paths in this collection. This can target prims or
377  /// properties directly, but cannot target another collection. This is to
378  /// keep the membership determining logic simple, efficient and easier to
379  /// reason about. Finally, it is invalid for a collection to exclude
380  /// paths that are not included in it. The presence of such "orphaned"
381  /// excluded paths will not affect the set of paths included in the
382  /// collection, but may affect the performance of querying membership of
383  /// a path in the collection (see
384  /// UsdCollectionAPI::MembershipQuery::IsPathIncluded)
385  /// or of enumerating the objects belonging to the collection (see
386  /// UsdCollectionAPI::GetIncludedObjects).
387  ///
388  USD_API
390 
391  /// See GetExcludesRel(), and also
392  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
393  USD_API
395 
396 public:
397  // ===================================================================== //
398  // Feel free to add custom code below this line, it will be preserved by
399  // the code generator.
400  //
401  // Just remember to:
402  // - Close the class declaration with };
403  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
404  // - Close the include guard with #endif
405  // ===================================================================== //
406  // --(BEGIN CUSTOM CODE)--
407 
408 public:
409  /// Returns the collection represented by the given collection path,
410  /// \p collectionPath on the given USD stage.
411  USD_API
412  static UsdCollectionAPI GetCollection(const UsdStagePtr &stage,
413  const SdfPath &collectionPath);
414 
415  /// Returns the schema object representing a collection named \p name on
416  /// the given \p prim.
417  USD_API
418  static UsdCollectionAPI GetCollection(const UsdPrim &prim,
419  const TfToken &name);
420 
421  /// Returns all the named collections on the given USD prim.
422  USD_API
423  static std::vector<UsdCollectionAPI> GetAllCollections(const UsdPrim &prim);
424 
425  /// Returns the canonical path that represents this collection.
426  /// This points to a property named "collection:{collectionName}" on the
427  /// prim defining the collection (which won't really exist as a property
428  /// on the UsdStage, but will be used to refer to the collection).
429  /// This is the path to be used to "include" this collection in another
430  /// collection.
431  USD_API
432  SdfPath GetCollectionPath() const;
433 
434  /// Returns the canonical path to the collection named, \p name on the given
435  /// prim, \p prim.
436  ///
437  /// \sa GetCollectionPath()
438  USD_API
440  const UsdPrim &prim,
441  const TfToken &collectionName);
442 
443  // Convenient alias for UsdCollectionMembershipQuery object
445 
446  /// Computes and returns a UsdCollectionMembershipQuery object which can
447  /// be used to query inclusion or exclusion of paths in the collection.
448  USD_API
450 
451  /// Populates the UsdCollectionMembershipQuery object with data from this
452  /// collection, so it can be used to query inclusion or exclusion of paths.
453  USD_API
455 
456  /// Returns true if the collection has nothing included in it.
457  /// This requires both that the includes relationship have no
458  /// target paths, and that the includeRoot attribute be false.
459  /// Note that there may be cases where the collection has no objects
460  /// included in it even when HasNoIncludedPaths() returns false.
461  /// For example, if the included objects are unloaded or if the
462  /// included objects are also excluded.
463  USD_API
464  bool HasNoIncludedPaths() const;
465 
466  /// Returns all the usd objects that satisfy the predicate, \p pred in the
467  /// collection represented by the UsdCollectionMembershipQuery object, \p
468  /// query.
469  ///
470  /// The results depends on the load state of the UsdStage, \p stage.
471  USD_API
472  static std::set<UsdObject> ComputeIncludedObjects(
474  const UsdStageWeakPtr &stage,
476 
477  /// Returns all the paths that satisfy the predicate, \p pred in the
478  /// collection represented by the UsdCollectionMembershipQuery object, \p
479  /// query.
480  ///
481  /// The result depends on the load state of the UsdStage, \p stage.
482  USD_API
485  const UsdStageWeakPtr &stage,
487 
488  /// @}
489 
490  /// \anchor UsdCollectionAPI_AuthoringAPI
491  /// \name Collection Authoring API
492  ///
493  /// Convenience API for adding or removing prims and properties to (or
494  /// from) a collection..
495  ///
496  /// @{
497 
498  /// Includes or adds the given path, \p pathToInclude in the collection.
499  ///
500  /// This does nothing if the path is already included in the collection.
501  ///
502  /// This does not modify the expansion-rule of the collection. Hence, if the
503  /// expansionRule is <i>expandPrims</i> or <i>expandPrimsAndProperties</i>,
504  /// then the descendants of \p pathToInclude will be also included in the
505  /// collection unless explicitly excluded.
506  ///
507  /// \sa UsdCollectionAPI::ExcludePath()
508  USD_API
509  bool IncludePath(const SdfPath &pathToInclude) const;
510 
511  /// Excludes or removes the given path, \p pathToExclude from the collection.
512  ///
513  /// If the collection is empty, the collection becomes one that
514  /// includes all paths except the givne path. Otherwise, this does
515  /// nothing if the path is not included in the collection.
516  ///
517  /// This does not modify the expansion-rule of the collection. Hence, if the
518  /// expansionRule is <i>expandPrims</i> or <i>expandPrimsAndProperties</i>,
519  /// then the descendants of \p pathToExclude will also be excluded from the
520  /// collection, unless explicitly included.
521  ///
522  /// \sa UsdCollectionAPI::IncludePath()
523  USD_API
524  bool ExcludePath(const SdfPath &pathToExclude) const;
525 
526  /// @}
527 
528  /// Validates the collection by checking the following rules:
529  /// * a collection's expansionRule should be one of "explicitOnly",
530  /// "expandPrims" or "expandPrimsAndProperties".
531  /// * a collection should not have have a circular dependency on
532  /// another collection.
533  /// * a collection should not have both includes and excludes
534  /// among its top-level rules
535  USD_API
536  bool Validate(std::string *reason) const;
537 
538  /// Resets the collection by clearing both the includes and excludes
539  /// targets of the collection in the current UsdEditTarget.
540  ///
541  /// \note This does not modify the "includeRoot" attribute which is used
542  /// to include or exclude everything (i.e. the pseudoRoot) in the USD stage.
543  USD_API
544  bool ResetCollection() const;
545 
546  /// Blocks the targets of the includes and excludes relationships of the
547  /// collection, making it
548  /// <* <i>empty</i> if "includeRoot" is false (or unset) or
549  /// * <i>include everything</i> if "includeRoot" is true.
550  /// (assuming there are no opinions in stronger edit targets).
551  USD_API
552  bool BlockCollection() const;
553 
554  /// Test whether a given \p name contains the "collection:" prefix
555  ///
556  USD_API
557  static bool CanContainPropertyName(const TfToken &name);
558 
559 private:
560 
561  // Returns the name of the property belonging to this collection, given the
562  // base name of the attribute. Eg, if baseName is 'includes', this
563  // returns 'collection:<name>:includes'.
564  TfToken _GetCollectionPropertyName(const TfToken &baseName=TfToken()) const;
565 
566  // Helper method for computing the UsdCollectionMembershipQuery object for
567  // a collection.
568  // This makes recursive calls if the collection includes other collections.
569  // \p chainedCollectionPaths is used to pass in the set of all seen and
570  // included collections in the dependency chain and is used to detect
571  // circular dependencies.
572  // If \p foundCircularDependency is not nullptr, it is set to true if a
573  // circular dependency is detected amongst the included collections.
574  // If it is nullptr, a warning is issued when a circular dependency is
575  // detected.
576  void _ComputeMembershipQueryImpl(
578  const SdfPathSet &chainedCollectionPaths,
579  bool *foundCircularDependency=nullptr) const;
580 };
581 
583 
584 #endif
static USD_API UsdCollectionAPI Apply(const UsdPrim &prim, const TfToken &name)
USD_API UsdCollectionMembershipQuery ComputeMembershipQuery() const
USD_API bool BlockCollection() const
static USD_API SdfPath GetNamedCollectionPath(const UsdPrim &prim, const TfToken &collectionName)
static USD_API std::vector< UsdCollectionAPI > GetAllCollections(const UsdPrim &prim)
Returns all the named collections on the given USD prim.
#define USD_API
Definition: api.h:40
USD_API UsdRelationship GetExcludesRel() const
USD_API bool HasNoIncludedPaths() const
USD_API UsdAttribute GetIncludeRootAttr() const
USD_API bool IncludePath(const SdfPath &pathToInclude) const
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
USD_API UsdRelationship CreateExcludesRel() const
Represents a flattened view of a collection. For more information about collections, please see UsdCollectionAPI as a way to encode and retrieve a collection from scene description. A UsdCollectionMembershipQuery object can be used to answer queries about membership of paths in the collection efficiently.
GLuint const GLchar * name
Definition: glcorearb.h:785
static USD_API bool CanApply(const UsdPrim &prim, const TfToken &name, std::string *whyNot=nullptr)
USD_API bool ResetCollection() const
USD_API UsdRelationship CreateIncludesRel() const
static USD_API UsdCollectionAPI Get(const UsdStagePtr &stage, const SdfPath &path)
USD_API UsdAttribute CreateExpansionRuleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
UsdSchemaKind
Definition: common.h:127
const TfToken & _GetInstanceName() const
TfToken GetName() const
Returns the name of this multiple-apply schema instance.
Definition: token.h:87
static USD_API bool IsCollectionAPIPath(const SdfPath &path, TfToken *name)
USD_API SdfPath GetCollectionPath() const
static USD_API UsdCollectionAPI GetCollection(const UsdStagePtr &stage, const SdfPath &collectionPath)
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
USD_API bool Validate(std::string *reason) const
USD_API UsdAttribute GetExpansionRuleAttr() const
Definition: prim.h:132
static USD_API bool IsSchemaPropertyBaseName(const TfToken &baseName)
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
static USD_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true, const TfToken instanceName=TfToken())
Definition: path.h:288
std::set< class SdfPath > SdfPathSet
A set of SdfPaths.
Definition: path.h:207
UsdStagePtr UsdStageWeakPtr
Definition: common.h:55
USD_API const Usd_PrimFlagsConjunction UsdPrimDefaultPredicate
Multiple Apply API Schema.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
static const UsdSchemaKind schemaKind
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USD_API UsdAttribute CreateIncludeRootAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
Definition: type.h:64
virtual USD_API ~UsdCollectionAPI()
Destructor.
static USD_API SdfPathSet ComputeIncludedPaths(const UsdCollectionMembershipQuery &query, const UsdStageWeakPtr &stage, const Usd_PrimFlagsPredicate &pred=UsdPrimDefaultPredicate)
USD_API UsdSchemaKind _GetSchemaKind() const override
UsdCollectionAPI(const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken())
GLenum query
Definition: glew.h:5734
Definition: value.h:168
static USD_API std::set< UsdObject > ComputeIncludedObjects(const UsdCollectionMembershipQuery &query, const UsdStageWeakPtr &stage, const Usd_PrimFlagsPredicate &pred=UsdPrimDefaultPredicate)
USD_API UsdRelationship GetIncludesRel() const
USD_API bool ExcludePath(const SdfPath &pathToExclude) const
UsdCollectionAPI(const UsdSchemaBase &schemaObj, const TfToken &name)
static USD_API bool CanContainPropertyName(const TfToken &name)