Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set GPrim::get_displayColor and GPrim::get_displayOpacity as const #196

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading