sliders: implement color coding for clarity
This commit is contained in:
@@ -42,10 +42,13 @@ OCIOGradingTransformLinearNode::OCIOGradingTransformLinearNode()
|
||||
{
|
||||
AddInput(kContrastInput, NodeValue::kVec4, QVector4D{1.0, 1.0, 1.0, 1.0});
|
||||
SetInputProperty(kContrastInput, QStringLiteral("min"), QVector4D{0.001f, 0.001f, 0.001f, 0.001f});
|
||||
SetVec4InputColors(kContrastInput);
|
||||
|
||||
AddInput(kOffsetInput, NodeValue::kVec4, QVector4D{0.0, 0.0, 0.0, 0.0});
|
||||
SetVec4InputColors(kOffsetInput);
|
||||
|
||||
AddInput(kExposureInput, NodeValue::kVec4, QVector4D{0.0, 0.0, 0.0, 0.0});
|
||||
SetVec4InputColors(kExposureInput);
|
||||
|
||||
AddInput(kSaturationInput, NodeValue::kFloat, 1.0);
|
||||
SetInputProperty(kSaturationInput, QStringLiteral("min"), 0.0);
|
||||
@@ -124,4 +127,12 @@ void OCIOGradingTransformLinearNode::ConfigChanged()
|
||||
GenerateProcessor();
|
||||
}
|
||||
|
||||
void OCIOGradingTransformLinearNode::SetVec4InputColors(const QString &input)
|
||||
{
|
||||
SetInputProperty(input, QStringLiteral("color0"), QColor(255, 0, 0).name());
|
||||
SetInputProperty(input, QStringLiteral("color1"), QColor(0, 255, 0).name());
|
||||
SetInputProperty(input, QStringLiteral("color2"), QColor(0, 0, 255).name());
|
||||
SetInputProperty(input, QStringLiteral("color3"), QColor(192, 192, 192).name());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,6 +55,9 @@ class OCIOGradingTransformLinearNode : public OCIOBaseNode
|
||||
protected slots:
|
||||
virtual void ConfigChanged() override;
|
||||
|
||||
private:
|
||||
void SetVec4InputColors(const QString &input);
|
||||
|
||||
};
|
||||
|
||||
} // olive
|
||||
|
||||
Reference in New Issue
Block a user