All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
resolveInfo.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 PXR_USD_USD_RESOLVE_INFO_H
25 #define PXR_USD_USD_RESOLVE_INFO_H
26 
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usd/api.h"
31 #include "pxr/usd/usd/stage.h"
32 #include "pxr/usd/sdf/layerOffset.h"
33 #include "pxr/usd/sdf/path.h"
34 #include "pxr/usd/pcp/node.h"
35 
36 #include "pxr/base/tf/declarePtrs.h"
37 
38 #include <limits>
39 
40 PXR_NAMESPACE_OPEN_SCOPE
41 
42 
44 
52 {
54 
59 };
60 
69 {
70 public:
72  : _source(UsdResolveInfoSourceNone)
73  , _layerIndex(std::numeric_limits<size_t>::max())
74  , _valueIsBlocked(false)
75  {
76  }
77 
80  return _source;
81  }
82 
88  bool HasAuthoredValueOpinion() const {
89  return
90  _source == UsdResolveInfoSourceDefault ||
92  _source == UsdResolveInfoSourceValueClips ||
93  _valueIsBlocked;
94  }
95 
98  bool HasAuthoredValue() const {
99  return
100  _source == UsdResolveInfoSourceDefault ||
101  _source == UsdResolveInfoSourceTimeSamples ||
103  }
104 
107  PcpNodeRef GetNode() const {
108  return _node;
109  }
110 
115  bool ValueIsBlocked() const {
116  return _valueIsBlocked;
117  }
118 
119 private:
121  UsdResolveInfoSource _source;
122 
133  PcpLayerStackPtr _layerStack;
134 
146  SdfPath _primPathInLayerStack;
147 
153  size_t _layerIndex;
154 
159  SdfLayerOffset _layerToStageOffset;
160 
164  bool _valueIsBlocked;
165 
168  PcpNodeRef _node;
169 
170  friend class UsdAttribute;
171  friend class UsdStage;
172  friend class UsdStage_ResolveInfoAccess;
173  friend class UsdAttributeQuery;
174 };
175 
176 
177 PXR_NAMESPACE_CLOSE_SCOPE
178 
179 #endif // PXR_USD_USD_RESOLVE_INFO_H
Built-in fallback value.
Definition: resolveInfo.h:55
#define TF_DECLARE_WEAK_PTRS(type)
Define standard weak pointer types.
Definition: declarePtrs.h:62
Represents a stack of layers that contribute opinions to composition.
Definition: layerStack.h:65
Object for efficiently making repeated queries for attribute values.
PcpNode represents a node in an expression tree for compositing scene description.
Definition: node.h:65
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:143
bool HasAuthoredValue() const
Return true if this UsdResolveInfo represents an attribute that has an authored value that is not blo...
Definition: resolveInfo.h:98
Container for information about the source of an attribute&#39;s value, i.e.
Definition: resolveInfo.h:68
Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time.
Definition: attribute.h:176
bool HasAuthoredValueOpinion() const
Return true if this UsdResolveInfo represents an attribute that has an authored value opinion...
Definition: resolveInfo.h:88
UsdResolveInfoSource GetSource() const
Return the source of the associated attribute&#39;s value.
Definition: resolveInfo.h:79
UsdResolveInfoSource
Describes the various sources of attribute values.
Definition: resolveInfo.h:51
PcpNodeRef GetNode() const
Return the node within the containing PcpPrimIndex that provided the resolved value opinion...
Definition: resolveInfo.h:107
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:288
Attribute time samples.
Definition: resolveInfo.h:57
bool ValueIsBlocked() const
Return true if this UsdResolveInfo represents an attribute whose value is blocked.
Definition: resolveInfo.h:115
Represents a time offset and scale between layers.
Definition: layerOffset.h:61
Attribute default value.
Definition: resolveInfo.h:56