Loading...
Searching...
No Matches
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"
33#include "pxr/usd/sdf/path.h"
34#include "pxr/usd/pcp/node.h"
35
37
38#include <limits>
39
40PXR_NAMESPACE_OPEN_SCOPE
41
42
44
52{
54
59};
60
69{
70public:
73 , _valueIsBlocked(false)
74 {
75 }
76
79 return _source;
80 }
81
88 return
89 _source == UsdResolveInfoSourceDefault ||
92 _valueIsBlocked;
93 }
94
97 bool HasAuthoredValue() const {
98 return
99 _source == UsdResolveInfoSourceDefault ||
102 }
103
107 return _node;
108 }
109
114 bool ValueIsBlocked() const {
115 return _valueIsBlocked;
116 }
117
118private:
129 PcpLayerStackPtr _layerStack;
130
136 SdfLayerHandle _layer;
137
140 PcpNodeRef _node;
141
146 SdfLayerOffset _layerToStageOffset;
147
159 SdfPath _primPathInLayerStack;
160
162 UsdResolveInfoSource _source;
163
167 bool _valueIsBlocked;
168
169 friend class UsdAttribute;
170 friend class UsdStage;
171 friend class UsdStage_ResolveInfoAccess;
172 friend class UsdAttributeQuery;
173};
174
175
176PXR_NAMESPACE_CLOSE_SCOPE
177
178#endif // PXR_USD_USD_RESOLVE_INFO_H
Represents a stack of layers that contribute opinions to composition.
Definition: layerStack.h:67
PcpNode represents a node in an expression tree for compositing scene description.
Definition: node.h:64
Represents a time offset and scale between layers.
Definition: layerOffset.h:61
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:176
Object for efficiently making repeated queries for attribute values.
Container for information about the source of an attribute's value, i.e.
Definition: resolveInfo.h:69
bool ValueIsBlocked() const
Return true if this UsdResolveInfo represents an attribute whose value is blocked.
Definition: resolveInfo.h:114
UsdResolveInfoSource GetSource() const
Return the source of the associated attribute's value.
Definition: resolveInfo.h:78
PcpNodeRef GetNode() const
Return the node within the containing PcpPrimIndex that provided the resolved value opinion.
Definition: resolveInfo.h:106
bool HasAuthoredValue() const
Return true if this UsdResolveInfo represents an attribute that has an authored value that is not blo...
Definition: resolveInfo.h:97
bool HasAuthoredValueOpinion() const
Return true if this UsdResolveInfo represents an attribute that has an authored value opinion.
Definition: resolveInfo.h:87
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:151
Standard pointer typedefs.
#define TF_DECLARE_WEAK_PTRS(type)
Define standard weak pointer types.
Definition: declarePtrs.h:62
UsdResolveInfoSource
Describes the various sources of attribute values.
Definition: resolveInfo.h:52
@ UsdResolveInfoSourceTimeSamples
Attribute time samples.
Definition: resolveInfo.h:57
@ UsdResolveInfoSourceValueClips
Value clips.
Definition: resolveInfo.h:58
@ UsdResolveInfoSourceDefault
Attribute default value.
Definition: resolveInfo.h:56
@ UsdResolveInfoSourceNone
No value.
Definition: resolveInfo.h:53
@ UsdResolveInfoSourceFallback
Built-in fallback value.
Definition: resolveInfo.h:55