added UI for editing video parameters in nodes
This commit is contained in:
@@ -47,7 +47,7 @@ ColorManager::ColorManager() :
|
||||
AddInput(kDefaultColorspaceIn, NodeValue::kCombo, InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable));
|
||||
|
||||
// Default reference space is scene linear
|
||||
AddInput(kReferenceSpaceIn, NodeValue::kText, OCIO::ROLE_SCENE_LINEAR, InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable));
|
||||
AddInput(kReferenceSpaceIn, NodeValue::kCombo, 0, InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable));
|
||||
|
||||
// Set config to our built-in default
|
||||
SetConfig(GetDefaultConfig());
|
||||
@@ -176,12 +176,13 @@ void ColorManager::SetDefaultInputColorSpace(const QString &s)
|
||||
|
||||
QString ColorManager::GetReferenceColorSpace() const
|
||||
{
|
||||
return GetStandardValue(kReferenceSpaceIn).toString();
|
||||
}
|
||||
ReferenceSpace ref_space = static_cast<ReferenceSpace>(GetStandardValue(kReferenceSpaceIn).toInt());
|
||||
|
||||
void ColorManager::SetReferenceColorSpace(const QString &s)
|
||||
{
|
||||
SetStandardValue(kReferenceSpaceIn, s);
|
||||
if (ref_space == kCompositingLog) {
|
||||
return OCIO::ROLE_COMPOSITING_LOG;
|
||||
} else {
|
||||
return OCIO::ROLE_SCENE_LINEAR;
|
||||
}
|
||||
}
|
||||
|
||||
QString ColorManager::GetCompliantColorSpace(const QString &s)
|
||||
@@ -267,6 +268,9 @@ void ColorManager::Retranslate()
|
||||
SetInputName(kConfigFilenameIn, tr("Configuration"));
|
||||
SetInputName(kDefaultColorspaceIn, tr("Default Input"));
|
||||
SetInputName(kReferenceSpaceIn, tr("Reference Space"));
|
||||
|
||||
SetComboBoxStrings(kReferenceSpaceIn, {tr("Scene Linear"), tr("Compositing Log")});
|
||||
SetInputProperty(kConfigFilenameIn, QStringLiteral("placeholder"), tr("(built-in)"));
|
||||
}
|
||||
|
||||
void ColorManager::InputValueChangedEvent(const QString &input, int element)
|
||||
|
||||
@@ -93,8 +93,6 @@ public:
|
||||
|
||||
QString GetReferenceColorSpace() const;
|
||||
|
||||
void SetReferenceColorSpace(const QString& s);
|
||||
|
||||
QString GetCompliantColorSpace(const QString& s);
|
||||
|
||||
ColorTransform GetCompliantColorSpace(const ColorTransform& transform, bool force_display = false);
|
||||
@@ -131,6 +129,11 @@ protected:
|
||||
virtual void InputValueChangedEvent(const QString &input, int element) override;
|
||||
|
||||
private:
|
||||
enum ReferenceSpace {
|
||||
kSceneLinear,
|
||||
kCompositingLog
|
||||
};
|
||||
|
||||
void SetConfig(OCIO::ConstConfigRcPtr config);
|
||||
|
||||
OCIO::ConstConfigRcPtr config_;
|
||||
|
||||
@@ -76,7 +76,7 @@ VideoParams::VideoParams() :
|
||||
VideoParams::VideoParams(int width, int height, Format format, int nb_channels, const rational& pixel_aspect_ratio, Interlacing interlacing, int divider) :
|
||||
width_(width),
|
||||
height_(height),
|
||||
depth_(0),
|
||||
depth_(1),
|
||||
format_(format),
|
||||
channel_count_(nb_channels),
|
||||
pixel_aspect_ratio_(pixel_aspect_ratio),
|
||||
@@ -106,7 +106,7 @@ VideoParams::VideoParams(int width, int height, int depth, Format format, int nb
|
||||
VideoParams::VideoParams(int width, int height, const rational &time_base, Format format, int nb_channels, const rational& pixel_aspect_ratio, Interlacing interlacing, int divider) :
|
||||
width_(width),
|
||||
height_(height),
|
||||
depth_(0),
|
||||
depth_(1),
|
||||
time_base_(time_base),
|
||||
format_(format),
|
||||
channel_count_(nb_channels),
|
||||
|
||||
Reference in New Issue
Block a user