colormanager: added wrappers for GetDefaultLumaCoefs

This commit is contained in:
itsmattkc
2020-04-23 21:39:21 +10:00
parent 9e04728c12
commit 6940b00164
2 changed files with 21 additions and 0 deletions
+18
View File
@@ -278,6 +278,24 @@ QStringList ColorManager::ListAvailableInputColorspaces(OCIO::ConstConfigRcPtr c
return spaces;
}
void ColorManager::GetDefaultLumaCoefs(float *rgb) const
{
config_->getDefaultLumaCoefs(rgb);
}
Color ColorManager::GetDefaultLumaCoefs() const
{
Color c;
// Just a default value, shouldn't be significant
c.set_alpha(1.0f);
// The float data in Color lines up with the "rgb" param of this function
GetDefaultLumaCoefs(c.data());
return c;
}
ColorManager::OCIOMethod ColorManager::GetOCIOMethodForMode(RenderMode::Mode mode)
{
return static_cast<OCIOMethod>(Core::GetPreferenceForRenderMode(mode, QStringLiteral("OCIOMethod")).toInt());
+3
View File
@@ -78,6 +78,9 @@ public:
static QStringList ListAvailableInputColorspaces(OCIO::ConstConfigRcPtr config);
void GetDefaultLumaCoefs(float* rgb) const;
Color GetDefaultLumaCoefs() const;
enum OCIOMethod {
kOCIOFast,
kOCIOAccurate