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 USD_RESOLVE_INFO_H
25 #define 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 
60 };
61 
70 {
71 public:
73  : _source(UsdResolveInfoSourceNone)
74  , _layerIndex(std::numeric_limits<size_t>::max())
75  , _valueIsBlocked(false)
76  {
77  }
78 
81  return _source;
82  }
83 
89  bool HasAuthoredValueOpinion() const {
90  return
91  _source == UsdResolveInfoSourceDefault ||
93  _source == UsdResolveInfoSourceValueClips ||
95  _valueIsBlocked;
96  }
97 
100  bool HasAuthoredValue() const {
101  return
102  _source == UsdResolveInfoSourceDefault ||
103  _source == UsdResolveInfoSourceTimeSamples ||
104  _source == UsdResolveInfoSourceValueClips ||
106  }
107 
110  PcpNodeRef GetNode() const {
111  return _node;
112  }
113 
118  bool ValueIsBlocked() const {
119  return _valueIsBlocked;
120  }
121 
122 private:
124  UsdResolveInfoSource _source;
125 
136  PcpLayerStackPtr _layerStack;
137 
149  SdfPath _primPathInLayerStack;
150 
156  size_t _layerIndex;
157 
162  SdfLayerOffset _layerToStageOffset;
163 
167  bool _valueIsBlocked;
168 
171  PcpNodeRef _node;
172 
173  friend class UsdAttribute;
174  friend class UsdStage;
175  friend class UsdStage_ResolveInfoAccess;
176  friend class UsdAttributeQuery;
177 };
178 
179 
180 PXR_NAMESPACE_CLOSE_SCOPE
181 
182 #endif // 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
Source may vary over time.
Definition: resolveInfo.h:59
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:142
bool HasAuthoredValue() const
Return true if this UsdResolveInfo represents an attribute that has an authored value that is not blo...
Definition: resolveInfo.h:100
Container for information about the source of an attribute&#39;s value, i.e.
Definition: resolveInfo.h:69
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:89
UsdResolveInfoSource GetSource() const
Return the source of the associated attribute&#39;s value.
Definition: resolveInfo.h:80
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:110
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:287
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:118
Represents a time offset and scale between layers.
Definition: layerOffset.h:61
Attribute default value.
Definition: resolveInfo.h:56