Loading...
Searching...
No Matches
resolveInfo.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_USD_RESOLVE_INFO_H
8#define PXR_USD_USD_RESOLVE_INFO_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usd/api.h"
14#include "pxr/usd/usd/stage.h"
15#include "pxr/base/ts/spline.h"
17#include "pxr/usd/sdf/path.h"
18#include "pxr/usd/pcp/node.h"
19
21
22#include <limits>
23#include <optional>
24
25PXR_NAMESPACE_OPEN_SCOPE
26
27
29
37{
39
45};
46
55{
56public:
59 , _valueIsBlocked(false)
60 {
61 }
62
65 return _source;
66 }
67
74 return
75 _source == UsdResolveInfoSourceDefault ||
78 _source == UsdResolveInfoSourceSpline ||
79 _valueIsBlocked;
80 }
81
84 bool HasAuthoredValue() const {
85 return
86 _source == UsdResolveInfoSourceDefault ||
90 }
91
95 return _node;
96 }
97
102 bool ValueIsBlocked() const {
103 return _valueIsBlocked;
104 }
105
113 return _source == UsdResolveInfoSourceTimeSamples ||
114 _source == UsdResolveInfoSourceSpline ||
116 }
117
118private:
129 PcpLayerStackPtr _layerStack;
130
137 SdfLayerHandle _layer;
138
141 PcpNodeRef _node;
142
147 SdfLayerOffset _layerToStageOffset;
148
160 SdfPath _primPathInLayerStack;
161
163 UsdResolveInfoSource _source;
164
167 std::optional<TsSpline> _spline;
168
172 bool _valueIsBlocked;
173
174 friend class UsdAttribute;
175 friend class UsdStage;
176 friend class UsdStage_ResolveInfoAccess;
177 friend class UsdAttributeQuery;
178};
179
180
181PXR_NAMESPACE_CLOSE_SCOPE
182
183#endif // PXR_USD_USD_RESOLVE_INFO_H
Represents a stack of layers that contribute opinions to composition.
Definition: layerStack.h:50
PcpNode represents a node in an expression tree for compositing scene description.
Definition: node.h:47
Represents a time offset and scale between layers.
Definition: layerOffset.h:44
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
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:55
bool ValueSourceMightBeTimeVarying() const
Returns true if the resolve info source might be time-varying; false otherwise.
Definition: resolveInfo.h:112
bool ValueIsBlocked() const
Return true if this UsdResolveInfo represents an attribute whose value is blocked.
Definition: resolveInfo.h:102
UsdResolveInfoSource GetSource() const
Return the source of the associated attribute's value.
Definition: resolveInfo.h:64
PcpNodeRef GetNode() const
Return the node within the containing PcpPrimIndex that provided the resolved value opinion.
Definition: resolveInfo.h:94
bool HasAuthoredValue() const
Return true if this UsdResolveInfo represents an attribute that has an authored value that is not blo...
Definition: resolveInfo.h:84
bool HasAuthoredValueOpinion() const
Return true if this UsdResolveInfo represents an attribute that has an authored value opinion.
Definition: resolveInfo.h:73
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:136
Standard pointer typedefs.
#define TF_DECLARE_WEAK_PTRS(type)
Define standard weak pointer types.
Definition: declarePtrs.h:45
UsdResolveInfoSource
Describes the various sources of attribute values.
Definition: resolveInfo.h:37
@ UsdResolveInfoSourceTimeSamples
Attribute time samples.
Definition: resolveInfo.h:42
@ UsdResolveInfoSourceValueClips
Value clips.
Definition: resolveInfo.h:43
@ UsdResolveInfoSourceDefault
Attribute default value.
Definition: resolveInfo.h:41
@ UsdResolveInfoSourceSpline
Spline value.
Definition: resolveInfo.h:44
@ UsdResolveInfoSourceNone
No value.
Definition: resolveInfo.h:38
@ UsdResolveInfoSourceFallback
Built-in fallback value.
Definition: resolveInfo.h:40