various: removed hardcoded OCIO::ROLE_SCENE_LINEAR to allow for a configurable reference space
This commit is contained in:
@@ -76,8 +76,8 @@ void OpenGLProxy::FrameToValue(DecoderPtr decoder, StreamPtr stream, const TimeR
|
||||
|
||||
if (!color_processor) {
|
||||
color_processor = OpenGLColorProcessor::Create(video_stream->footage()->project()->color_manager()->GetConfig(),
|
||||
video_stream->colorspace(),
|
||||
OCIO::ROLE_SCENE_LINEAR);
|
||||
video_stream->colorspace(),
|
||||
video_stream->footage()->project()->color_manager()->GetReferenceColorSpace());
|
||||
color_cache_.Add(colorspace_match, color_processor);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ ColorManager::ColorManager()
|
||||
{
|
||||
// Ensures config is set to something
|
||||
config_ = OCIO::GetCurrentConfig();
|
||||
|
||||
// Default reference space is scene linear
|
||||
reference_space_ = OCIO::ROLE_SCENE_LINEAR;
|
||||
}
|
||||
|
||||
OCIO::ConstConfigRcPtr ColorManager::GetConfig() const
|
||||
@@ -108,6 +111,16 @@ void ColorManager::SetDefaultInputColorSpace(const QString &s)
|
||||
default_input_color_space_ = s;
|
||||
}
|
||||
|
||||
const QString &ColorManager::GetReferenceColorSpace() const
|
||||
{
|
||||
return reference_space_;
|
||||
}
|
||||
|
||||
void ColorManager::SetReferenceColorSpace(const QString &s)
|
||||
{
|
||||
reference_space_ = s;
|
||||
}
|
||||
|
||||
QStringList ColorManager::ListAvailableInputColorspaces(OCIO::ConstConfigRcPtr config)
|
||||
{
|
||||
QStringList spaces;
|
||||
|
||||
@@ -40,6 +40,10 @@ public:
|
||||
|
||||
void SetDefaultInputColorSpace(const QString& s);
|
||||
|
||||
const QString& GetReferenceColorSpace() const;
|
||||
|
||||
void SetReferenceColorSpace(const QString& s);
|
||||
|
||||
static QStringList ListAvailableInputColorspaces(OCIO::ConstConfigRcPtr config);
|
||||
|
||||
enum OCIOMethod {
|
||||
@@ -70,6 +74,8 @@ private:
|
||||
|
||||
QString default_input_color_space_;
|
||||
|
||||
QString reference_space_;
|
||||
|
||||
};
|
||||
|
||||
#endif // COLORSERVICE_H
|
||||
|
||||
Reference in New Issue
Block a user