colordialog: updated to show input/reference/display values
This commit is contained in:
@@ -77,8 +77,8 @@ OpenGLColorProcessor::OpenGLColorProcessor(OCIO::ConstConfigRcPtr config, const
|
||||
{
|
||||
}
|
||||
|
||||
OpenGLColorProcessor::OpenGLColorProcessor(OCIO::ConstConfigRcPtr config, const QString &source_space, QString display, QString view, const QString &look) :
|
||||
ColorProcessor(config, source_space, display, view, look),
|
||||
OpenGLColorProcessor::OpenGLColorProcessor(OCIO::ConstConfigRcPtr config, const QString &source_space, QString display, QString view, const QString &look, Direction dir) :
|
||||
ColorProcessor(config, source_space, display, view, look, dir),
|
||||
ocio_lut_(0)
|
||||
{
|
||||
}
|
||||
@@ -93,9 +93,9 @@ OpenGLColorProcessorPtr OpenGLColorProcessor::Create(OCIO::ConstConfigRcPtr conf
|
||||
return std::make_shared<OpenGLColorProcessor>(config, source_space, dest_space);
|
||||
}
|
||||
|
||||
OpenGLColorProcessorPtr OpenGLColorProcessor::Create(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &display, const QString &view, const QString &look)
|
||||
OpenGLColorProcessorPtr OpenGLColorProcessor::Create(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &display, const QString &view, const QString &look, Direction dir)
|
||||
{
|
||||
return std::make_shared<OpenGLColorProcessor>(config, source_space, display, view, look);
|
||||
return std::make_shared<OpenGLColorProcessor>(config, source_space, display, view, look, dir);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -39,7 +39,8 @@ public:
|
||||
const QString& source_space,
|
||||
QString display,
|
||||
QString view,
|
||||
const QString& look);
|
||||
const QString& look,
|
||||
Direction dir);
|
||||
|
||||
~OpenGLColorProcessor();
|
||||
|
||||
@@ -49,7 +50,8 @@ public:
|
||||
const QString& source_space,
|
||||
const QString& display,
|
||||
const QString& view,
|
||||
const QString& look);
|
||||
const QString& look,
|
||||
Direction dir = kNormal);
|
||||
|
||||
void Enable(QOpenGLContext* context, bool alpha_is_associated);
|
||||
bool IsEnabled() const;
|
||||
|
||||
@@ -34,7 +34,8 @@ ColorProcessor::ColorProcessor(OCIO::ConstConfigRcPtr config,
|
||||
const QString& source_space,
|
||||
QString display,
|
||||
QString view,
|
||||
const QString& look)
|
||||
const QString& look,
|
||||
Direction direction)
|
||||
{
|
||||
if (display.isEmpty()) {
|
||||
display = config->getDefaultDisplay();
|
||||
@@ -55,7 +56,9 @@ ColorProcessor::ColorProcessor(OCIO::ConstConfigRcPtr config,
|
||||
transform->setLooksOverrideEnabled(true);
|
||||
}
|
||||
|
||||
processor = config->getProcessor(transform);
|
||||
OCIO::TransformDirection dir = (direction == kInverse) ? OCIO::TRANSFORM_DIR_INVERSE : OCIO::TRANSFORM_DIR_FORWARD;
|
||||
|
||||
processor = config->getProcessor(transform, dir);
|
||||
}
|
||||
|
||||
void ColorProcessor::ConvertFrame(FramePtr f)
|
||||
@@ -76,12 +79,12 @@ ColorProcessorPtr ColorProcessor::Create(OCIO::ConstConfigRcPtr config, const QS
|
||||
return std::make_shared<ColorProcessor>(config, source_space, dest_space);
|
||||
}
|
||||
|
||||
ColorProcessorPtr ColorProcessor::Create(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &display, const QString &view, const QString &look)
|
||||
ColorProcessorPtr ColorProcessor::Create(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &display, const QString &view, const QString &look, Direction direction)
|
||||
{
|
||||
return std::make_shared<ColorProcessor>(config, source_space, display, view, look);
|
||||
return std::make_shared<ColorProcessor>(config, source_space, display, view, look, direction);
|
||||
}
|
||||
|
||||
OpenColorIO::v1::ConstProcessorRcPtr ColorProcessor::GetProcessor()
|
||||
OCIO::ConstProcessorRcPtr ColorProcessor::GetProcessor()
|
||||
{
|
||||
return processor;
|
||||
}
|
||||
|
||||
@@ -35,12 +35,18 @@ using ColorProcessorPtr = std::shared_ptr<ColorProcessor>;
|
||||
class ColorProcessor
|
||||
{
|
||||
public:
|
||||
enum Direction {
|
||||
kNormal,
|
||||
kInverse
|
||||
};
|
||||
|
||||
ColorProcessor(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &dest_space);
|
||||
|
||||
ColorProcessor(OCIO::ConstConfigRcPtr config, const QString& source_space,
|
||||
QString display,
|
||||
QString view,
|
||||
const QString& look);
|
||||
const QString& look,
|
||||
Direction direction);
|
||||
|
||||
DISABLE_COPY_MOVE(ColorProcessor)
|
||||
|
||||
@@ -50,7 +56,8 @@ public:
|
||||
const QString& source_space,
|
||||
const QString& display,
|
||||
const QString& view,
|
||||
const QString& look);
|
||||
const QString& look,
|
||||
Direction direction = kNormal);
|
||||
|
||||
OCIO::ConstProcessorRcPtr GetProcessor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user