All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
common.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_COMMON_H
25 #define USD_COMMON_H
26 
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usd/api.h"
31 #include "pxr/base/tf/declarePtrs.h"
32 #include "pxr/base/tf/stringUtils.h"
33 #include "pxr/usd/sdf/layerOffset.h"
34 
35 #include "pxr/usd/usd/primDataHandle.h"
36 #include "pxr/usd/usd/timeCode.h"
37 
38 #include <string>
39 #include <map>
40 
41 PXR_NAMESPACE_OPEN_SCOPE
42 
43 // Forward declare Usd classes.
44 class UsdStage;
45 class UsdObject;
46 class UsdPrim;
47 class UsdProperty;
48 class UsdAttribute;
49 class UsdRelationship;
50 class UsdStageCache;
51 
52 class VtValue;
53 
55 typedef UsdStagePtr UsdStageWeakPtr;
56 
58 USD_API
59 std::string UsdDescribe(const UsdObject &);
61 USD_API
62 std::string UsdDescribe(const UsdStageRefPtr &);
64 USD_API
65 std::string UsdDescribe(const UsdStageWeakPtr &);
67 USD_API
68 std::string UsdDescribe(const UsdStage *);
70 USD_API
71 std::string UsdDescribe(const UsdStage &);
73 USD_API
74 std::string UsdDescribe(const UsdStageCache &);
75 
76 // XXX:
77 // Currently used for querying composed values from ascii layers, so VtValue is
78 // the optimal value-store, but this may not always be the case.
79 typedef std::map<class TfToken, VtValue,
81  > UsdMetadataValueMap;
82 
86 USD_API
88 
102 USD_API
104 
131 };
132 
143 };
144 
149 enum class UsdSchemaType {
154  AbstractBase,
165 
166 };
167 
168 PXR_NAMESPACE_CLOSE_SCOPE
169 
170 #endif
The position at the front of the prepend list.
Definition: common.h:115
UsdListPosition
Specifies a position to add items to lists.
Definition: common.h:110
Provides dictionary ordering binary predicate function on strings.
Definition: stringUtils.h:500
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:142
Load a prim plus all its descendants.
Definition: common.h:140
USD_API SdfLayerOffset UsdPrepLayerOffset(SdfLayerOffset offset)
Prepare the given offset for application to map layer time to stage time, respecting the environment ...
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:89
Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time.
Definition: attribute.h:176
Represents a concrete typed schema.
USD_API std::string UsdDescribe(const UsdObject &)
Return a human-readable description.
The position at the front of the append list.
Definition: common.h:125
A strongly concurrency safe collection of UsdStageRefPtr s, enabling sharing across multiple clients ...
Definition: stageCache.h:86
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:89
USD_API bool UsdUsesInverseLayerOffset()
Returns true if USD uses the historical behavior of applying the inverse of composed layer offsets to...
Multiple Apply API Schema.
Non-applied API schema.
Base class for Usd scenegraph objects, providing common API.
Definition: object.h:129
Load a prim by itself with no descendants.
Definition: common.h:142
UsdSchemaType
An enum representing which type of schema a given schema class belongs to.
Definition: common.h:149
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a &quot;Prim&quot; as ...
Definition: prim.h:131
Single Apply API schema.
Represents a non-concrete typed schema.
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:128
The position at the back of the append list.
Definition: common.h:130
UsdLoadPolicy
Controls UsdStage::Load() and UsdPrim::Load() behavior regarding whether or not descendant prims are ...
Definition: common.h:138
Base class for UsdAttribute and UsdRelationship scenegraph objects.
Definition: property.h:55
The position at the back of the prepend list.
Definition: common.h:120
Represents a time offset and scale between layers.
Definition: layerOffset.h:61
Represents abstract or base schema types that are interface-only and cannot be instantiated.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:182