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 UsdSchemaType
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 private:
239 
240  /// Applies this <b>multiple-apply</b> API schema to the given \p prim
241  /// along with the given instance name, \p name.
242  ///
243  /// This information is stored by adding "CollectionAPI:<i>name</i>"
244  /// to the token-valued, listOp metadata \em apiSchemas on the prim.
245  /// For example, if \p name is 'instance1', the token
246  /// 'CollectionAPI:instance1' is added to 'apiSchemas'.
247  ///
248  /// \return A valid UsdCollectionAPI object is returned upon success.
249  /// An invalid (or empty) UsdCollectionAPI object is returned upon
250  /// failure. See \ref UsdPrim::ApplyAPI() for
251  /// conditions resulting in failure.
252  ///
253  /// \sa UsdPrim::GetAppliedSchemas()
254  /// \sa UsdPrim::HasAPI()
255  /// \sa UsdPrim::ApplyAPI()
256  /// \sa UsdPrim::RemoveAPI()
257  ///
258  static UsdCollectionAPI
259  _Apply(const UsdPrim &prim, const TfToken &name);
260 
261 protected:
262  /// Returns the type of schema this class belongs to.
263  ///
264  /// \sa UsdSchemaType
265  USD_API
266  UsdSchemaType _GetSchemaType() const override;
267 
268 private:
269  // needs to invoke _GetStaticTfType.
270  friend class UsdSchemaRegistry;
271  USD_API
272  static const TfType &_GetStaticTfType();
273 
274  static bool _IsTypedSchema();
275 
276  // override SchemaBase virtuals.
277  USD_API
278  const TfType &_GetTfType() const override;
279 
280 public:
281  // --------------------------------------------------------------------- //
282  // EXPANSIONRULE
283  // --------------------------------------------------------------------- //
284  /// Specifies how the paths that are included in
285  /// the collection must be expanded to determine its members.
286  ///
287  /// | ||
288  /// | -- | -- |
289  /// | Declaration | `uniform token expansionRule = "expandPrims"` |
290  /// | C++ Type | TfToken |
291  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
292  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
293  /// | \ref UsdTokens "Allowed Values" | explicitOnly, expandPrims, expandPrimsAndProperties |
294  USD_API
296 
297  /// See GetExpansionRuleAttr(), and also
298  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
299  /// If specified, author \p defaultValue as the attribute's default,
300  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
301  /// the default for \p writeSparsely is \c false.
302  USD_API
303  UsdAttribute CreateExpansionRuleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
304 
305 public:
306  // --------------------------------------------------------------------- //
307  // INCLUDEROOT
308  // --------------------------------------------------------------------- //
309  /// Boolean attribute indicating whether the pseudo-root
310  /// path &lt;/&gt; should be counted as one of the included target
311  /// paths. The fallback is false. This separate attribute is
312  /// required because relationships cannot directly target the root.
313  ///
314  /// | ||
315  /// | -- | -- |
316  /// | Declaration | `uniform bool includeRoot` |
317  /// | C++ Type | bool |
318  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
319  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
320  USD_API
322 
323  /// See GetIncludeRootAttr(), and also
324  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
325  /// If specified, author \p defaultValue as the attribute's default,
326  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
327  /// the default for \p writeSparsely is \c false.
328  USD_API
329  UsdAttribute CreateIncludeRootAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
330 
331 public:
332  // --------------------------------------------------------------------- //
333  // INCLUDES
334  // --------------------------------------------------------------------- //
335  /// Specifies a list of targets that are included in the collection.
336  /// This can target prims or properties directly. A collection can insert
337  /// the rules of another collection by making its <i>includes</i>
338  /// relationship target the <b>collection:{collectionName}</b> property on
339  /// the owning prim of the collection to be included
340  ///
341  USD_API
343 
344  /// See GetIncludesRel(), and also
345  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
346  USD_API
348 
349 public:
350  // --------------------------------------------------------------------- //
351  // EXCLUDES
352  // --------------------------------------------------------------------- //
353  /// Specifies a list of targets that are excluded below
354  /// the included paths in this collection. This can target prims or
355  /// properties directly, but cannot target another collection. This is to
356  /// keep the membership determining logic simple, efficient and easier to
357  /// reason about. Finally, it is invalid for a collection to exclude
358  /// paths that are not included in it. The presence of such "orphaned"
359  /// excluded paths will not affect the set of paths included in the
360  /// collection, but may affect the performance of querying membership of
361  /// a path in the collection (see
362  /// UsdCollectionAPI::MembershipQuery::IsPathIncluded)
363  /// or of enumerating the objects belonging to the collection (see
364  /// UsdCollectionAPI::GetIncludedObjects).
365  ///
366  USD_API
368 
369  /// See GetExcludesRel(), and also
370  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
371  USD_API
373 
374 public:
375  // ===================================================================== //
376  // Feel free to add custom code below this line, it will be preserved by
377  // the code generator.
378  //
379  // Just remember to:
380  // - Close the class declaration with };
381  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
382  // - Close the include guard with #endif
383  // ===================================================================== //
384  // --(BEGIN CUSTOM CODE)--
385 
386 public:
387  /// Adds a new collection named \p name on the given prim, \p prim with the
388  /// specified expansion-rule, \p expansionRule.
389  ///
390  /// If a collection named \p name already exists, its expansion-rule is
391  /// updated with the provided value and it is returned.
392  ///
393  /// The name of a collection, \p name may itself be namespaced, to facilitate
394  /// organization of collections into groups. However, the base-name of a
395  /// collection (i.e. the last component of the collection name) should not
396  /// be the same as one of the core collection schema properties,
397  /// i.e. should not be 'expansionRule' or 'includes' or 'excludes'.
398  USD_API
400  const UsdPrim& prim,
401  const TfToken &name,
402  const TfToken &expansionRule=UsdTokens->expandPrims);
403 
404  /// Returns the collection represented by the given collection path,
405  /// \p collectionPath on the given USD stage.
406  USD_API
407  static UsdCollectionAPI GetCollection(const UsdStagePtr &stage,
408  const SdfPath &collectionPath);
409 
410  /// Returns the schema object representing a collection named \p name on
411  /// the given \p prim.
412  USD_API
413  static UsdCollectionAPI GetCollection(const UsdPrim &prim,
414  const TfToken &name);
415 
416  /// Returns all the named collections on the given USD prim.
417  USD_API
418  static std::vector<UsdCollectionAPI> GetAllCollections(const UsdPrim &prim);
419 
420  /// Returns the canonical path that represents this collection.
421  /// This points to a property named "collection:{collectionName}" on the
422  /// prim defining the collection (which won't really exist as a property
423  /// on the UsdStage, but will be used to refer to the collection).
424  /// This is the path to be used to "include" this collection in another
425  /// collection.
426  USD_API
427  SdfPath GetCollectionPath() const;
428 
429  /// Returns the canonical path to the collection named, \p name on the given
430  /// prim, \p prim.
431  ///
432  /// \sa GetCollectionPath()
433  USD_API
435  const UsdPrim &prim,
436  const TfToken &collectionName);
437 
438  // Convenient alias for UsdCollectionMembershipQuery object
440 
441  /// Computes and returns a UsdCollectionMembershipQuery object which can
442  /// be used to query inclusion or exclusion of paths in the collection.
443  USD_API
445 
446  /// Populates the UsdCollectionMembershipQuery object with data from this
447  /// collection, so it can be used to query inclusion or exclusion of paths.
448  USD_API
450 
451  /// Returns true if the collection has nothing included in it.
452  /// This requires both that the includes relationship have no
453  /// target paths, and that the includeRoot attribute be false.
454  /// Note that there may be cases where the collection has no objects
455  /// included in it even when HasNoIncludedPaths() returns false.
456  /// For example, if the included objects are unloaded or if the
457  /// included objects are also excluded.
458  USD_API
459  bool HasNoIncludedPaths() const;
460 
461  /// Returns all the usd objects that satisfy the predicate, \p pred in the
462  /// collection represented by the UsdCollectionMembershipQuery object, \p
463  /// query.
464  ///
465  /// The results depends on the load state of the UsdStage, \p stage.
466  USD_API
467  static std::set<UsdObject> ComputeIncludedObjects(
469  const UsdStageWeakPtr &stage,
471 
472  /// Returns all the paths that satisfy the predicate, \p pred in the
473  /// collection represented by the UsdCollectionMembershipQuery object, \p
474  /// query.
475  ///
476  /// The result depends on the load state of the UsdStage, \p stage.
477  USD_API
480  const UsdStageWeakPtr &stage,
482 
483  /// @}
484 
485  /// \anchor UsdCollectionAPI_AuthoringAPI
486  /// \name Collection Authoring API
487  ///
488  /// Convenience API for adding or removing prims and properties to (or
489  /// from) a collection..
490  ///
491  /// @{
492 
493  /// Includes or adds the given path, \p pathToInclude in the collection.
494  ///
495  /// This does nothing if the path is already included in the collection.
496  ///
497  /// This does not modify the expansion-rule of the collection. Hence, if the
498  /// expansionRule is <i>expandPrims</i> or <i>expandPrimsAndProperties</i>,
499  /// then the descendants of \p pathToInclude will be also included in the
500  /// collection unless explicitly excluded.
501  ///
502  /// \sa UsdCollectionAPI::ExcludePath()
503  USD_API
504  bool IncludePath(const SdfPath &pathToInclude) const;
505 
506  /// Excludes or removes the given path, \p pathToExclude from the collection.
507  ///
508  /// If the collection is empty, the collection becomes one that
509  /// includes all paths except the givne path. Otherwise, this does
510  /// nothing if the path is not included in the collection.
511  ///
512  /// This does not modify the expansion-rule of the collection. Hence, if the
513  /// expansionRule is <i>expandPrims</i> or <i>expandPrimsAndProperties</i>,
514  /// then the descendants of \p pathToExclude will also be excluded from the
515  /// collection, unless explicitly included.
516  ///
517  /// \sa UsdCollectionAPI::IncludePath()
518  USD_API
519  bool ExcludePath(const SdfPath &pathToExclude) const;
520 
521  /// @}
522 
523  /// Validates the collection by checking the following rules:
524  /// * a collection's expansionRule should be one of "explicitOnly",
525  /// "expandPrims" or "expandPrimsAndProperties".
526  /// * a collection should not have have a circular dependency on
527  /// another collection.
528  /// * a collection should not have both includes and excludes
529  /// among its top-level rules
530  USD_API
531  bool Validate(std::string *reason) const;
532 
533  /// Resets the collection by clearing both the includes and excludes
534  /// targets of the collection in the current UsdEditTarget.
535  ///
536  /// \note This does not modify the "includeRoot" attribute which is used
537  /// to include or exclude everything (i.e. the pseudoRoot) in the USD stage.
538  USD_API
539  bool ResetCollection() const;
540 
541  /// Blocks the targets of the includes and excludes relationships of the
542  /// collection, making it
543  /// <* <i>empty</i> if "includeRoot" is false (or unset) or
544  /// * <i>include everything</i> if "includeRoot" is true.
545  /// (assuming there are no opinions in stronger edit targets).
546  USD_API
547  bool BlockCollection() const;
548 
549 private:
550 
551  // Returns the name of the property belonging to this collection, given the
552  // base name of the attribute. Eg, if baseName is 'includes', this
553  // returns 'collection:<name>:includes'.
554  TfToken _GetCollectionPropertyName(const TfToken &baseName=TfToken()) const;
555 
556  // Helper method for computing the UsdCollectionMembershipQuery object for
557  // a collection.
558  // This makes recursive calls if the collection includes other collections.
559  // \p chainedCollectionPaths is used to pass in the set of all seen and
560  // included collections in the dependency chain and is used to detect
561  // circular dependencies.
562  // If \p foundCircularDependency is not nullptr, it is set to true if a
563  // circular dependency is detected amongst the included collections.
564  // If it is nullptr, a warning is issued when a circular dependency is
565  // detected.
566  void _ComputeMembershipQueryImpl(
568  const SdfPathSet &chainedCollectionPaths,
569  bool *foundCircularDependency=nullptr) const;
570 };
571 
573 
574 #endif
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.
GLuint const GLchar * name
Definition: glew.h:1814
#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
USD_API UsdRelationship CreateExcludesRel() const
GLenum query
Definition: glew.h:5704
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.
USD_API bool ResetCollection() const
USD_API UsdRelationship CreateIncludesRel() const
static USD_API UsdCollectionAPI ApplyCollection(const UsdPrim &prim, const TfToken &name, const TfToken &expansionRule=UsdTokens->expandPrims)
static USD_API UsdCollectionAPI Get(const UsdStagePtr &stage, const SdfPath &path)
USD_API UsdAttribute CreateExpansionRuleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
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)
USD_API UsdSchemaType _GetSchemaType() const override
static const UsdSchemaType schemaType
Multiple Apply API Schema.
USD_API bool Validate(std::string *reason) const
USD_API UsdAttribute GetExpansionRuleAttr() const
UsdSchemaType
Definition: common.h:127
Definition: prim.h:132
static USD_API bool IsSchemaPropertyBaseName(const TfToken &baseName)
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:446
static USD_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true, const TfToken instanceName=TfToken())
Definition: path.h:288
USD_API TfStaticData< UsdTokensType > UsdTokens
std::set< class SdfPath > SdfPathSet
A set of SdfPaths.
Definition: path.h:207
GLsizei const GLchar *const * path
Definition: glew.h:6461
UsdStagePtr UsdStageWeakPtr
Definition: common.h:55
GLsizei const GLchar *const * string
Definition: glew.h:1844
USD_API const Usd_PrimFlagsConjunction UsdPrimDefaultPredicate
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
#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)
UsdCollectionAPI(const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken())
Definition: value.h:174
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)