Skip to content

Commit

Permalink
Merge pull request #196 from rdeioris/get_displayColorAndOpacity_const
Browse files Browse the repository at this point in the history
set GPrim::get_displayColor and GPrim::get_displayOpacity as const
  • Loading branch information
syoyo authored Oct 21, 2024
2 parents 7bc9f32 + 181dd4a commit fe15123
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/usdGeom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/usdGeom.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fe15123

Please sign in to comment.