7#ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_ATTRIBUTE_COLORSPACE_H
8#define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_ATTRIBUTE_COLORSPACE_H
10#include "pxr/usd/usd/attribute.h"
11#include "pxr/usdImaging/usdImaging/api.h"
12#include "pxr/imaging/hd/dataSource.h"
13#include "pxr/imaging/hd/dataSourceTypeDefs.h"
16PXR_NAMESPACE_OPEN_SCOPE
49 TfToken sourceColorSpaceInput = _GetSourceColorSpaceInput();
50 if (!sourceColorSpaceInput.
IsEmpty()) {
51 return sourceColorSpaceInput;
63 HdSampledDataSource::Time startTime,
64 HdSampledDataSource::Time endTime,
65 std::vector<HdSampledDataSource::Time> *outSampleTimes)
override
82 TfToken _GetSourceColorSpaceInput() {
83 static TfToken inputSourceColorSpace(
"inputs:sourceColorSpace");
86 if (_usdAttr.
GetName() !=
"inputs:file") {
99 return sourceColorSpace;
107PXR_NAMESPACE_CLOSE_SCOPE
A datasource representing a concretely-typed sampled value.
Token for efficient comparison, assignment, and hashing of known strings.
bool IsEmpty() const
Returns true iff this token contains the empty string "".
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
bool Get(T *value, UsdTimeCode time=UsdTimeCode::Default()) const
Perform value resolution to fetch the value of this attribute at the requested UsdTimeCode time,...
static USD_API TfToken ComputeColorSpaceName(const UsdAttribute &attribute, ColorSpaceCache *cache=nullptr)
Computes the color space name for the given attribute.
A data source that represents the metadata on a USD Attribute.
TfToken GetTypedValue(HdSampledDataSource::Time shutterOffset) override
Returns the extracted TfToken value of the color space for the attribute.
bool GetContributingSampleTimesForInterval(HdSampledDataSource::Time startTime, HdSampledDataSource::Time endTime, std::vector< HdSampledDataSource::Time > *outSampleTimes) override
Returns false since we do not expect the color space value to vary over time.
VtValue GetValue(HdSampledDataSource::Time shutterOffset) override
Returns the VtValue of the colorspace for the attribute.
UsdPrim GetPrim() const
Return this object if it is a prim, otherwise return this object's nearest owning prim.
const TfToken & GetName() const
Return the full name of this object, i.e.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
USD_API UsdAttribute GetAttribute(const TfToken &attrName) const
Return a UsdAttribute with the name attrName.
USD_API bool HasAttribute(const TfToken &attrName) const
Return true if this prim has an attribute named attrName, false otherwise.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
bool IsHolding() const
Return true if this value is holding an object of type T, false otherwise.
T const & UncheckedGet() const &
Returns a const reference to the held object if the held object is of type T.
#define TF_UNUSED(x)
Stops compiler from producing unused argument or variable warnings.