From 181dd4a5b63501d85e885f76e2416819edbc449b Mon Sep 17 00:00:00 2001 From: rdeioris Date: Mon, 21 Oct 2024 07:25:36 +0200 Subject: [PATCH] set GPrim::get_displayColor and GPrim::get_displayOpacity as const --- src/usdGeom.cc | 4 ++-- src/usdGeom.hh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/usdGeom.cc b/src/usdGeom.cc index d3797f38..e59d30e8 100644 --- a/src/usdGeom.cc +++ b/src/usdGeom.cc @@ -680,7 +680,7 @@ bool GPrim::set_primvar(const GeomPrimvar &primvar, return true; } -bool GPrim::get_displayColor(value::color3f *dst, double t, const value::TimeSampleInterpolationType tinterp) +bool GPrim::get_displayColor(value::color3f *dst, double t, const value::TimeSampleInterpolationType tinterp) const { // TODO: timeSamples (void)t; @@ -696,7 +696,7 @@ bool GPrim::get_displayColor(value::color3f *dst, double t, const value::TimeSam return primvar.get_value(dst); } -bool GPrim::get_displayOpacity(float *dst, double t, const value::TimeSampleInterpolationType tinterp) +bool GPrim::get_displayOpacity(float *dst, double t, const value::TimeSampleInterpolationType tinterp) const { // TODO: timeSamples (void)t; diff --git a/src/usdGeom.hh b/src/usdGeom.hh index 8163fa1c..3903e6ec 100644 --- a/src/usdGeom.hh +++ b/src/usdGeom.hh @@ -359,9 +359,9 @@ struct GPrim : Xformable, MaterialBinding, Collection { Purpose::Default}; // "uniform token purpose" // Handy API to get `primvars:displayColor` and `primvars:displayOpacity` - bool get_displayColor(value::color3f *col, const double t = value::TimeCode::Default(), const value::TimeSampleInterpolationType tinterp = value::TimeSampleInterpolationType::Linear); + bool get_displayColor(value::color3f *col, const double t = value::TimeCode::Default(), const value::TimeSampleInterpolationType tinterp = value::TimeSampleInterpolationType::Linear) const; - bool get_displayOpacity(float *opacity, const double t = value::TimeCode::Default(), const value::TimeSampleInterpolationType tinterp = value::TimeSampleInterpolationType::Linear); + bool get_displayOpacity(float *opacity, const double t = value::TimeCode::Default(), const value::TimeSampleInterpolationType tinterp = value::TimeSampleInterpolationType::Linear) const; RelationshipProperty proxyPrim;