Merge branch 'master' into nodeviewredux
This commit is contained in:
@@ -27,7 +27,7 @@ PanNode::PanNode()
|
||||
samples_input_ = new NodeInput("samples_in", NodeParam::kSamples);
|
||||
AddInput(samples_input_);
|
||||
|
||||
panning_input_ = new NodeInput("panning_in", NodeParam::kFloat);
|
||||
panning_input_ = new NodeInput("panning_in", NodeParam::kFloat, 0.0);
|
||||
panning_input_->set_property("min", -1.0);
|
||||
panning_input_->set_property("max", 1.0);
|
||||
panning_input_->set_property("view", "percent");
|
||||
|
||||
@@ -27,7 +27,7 @@ VolumeNode::VolumeNode()
|
||||
samples_input_ = new NodeInput("samples_in", NodeParam::kSamples);
|
||||
AddInput(samples_input_);
|
||||
|
||||
volume_input_ = new NodeInput("volume_in", NodeParam::kFloat, 1);
|
||||
volume_input_ = new NodeInput("volume_in", NodeParam::kFloat, 1.0);
|
||||
volume_input_->set_property("min", 0.0);
|
||||
volume_input_->set_property("view", "db");
|
||||
AddInput(volume_input_);
|
||||
|
||||
@@ -30,10 +30,10 @@ OLIVE_NAMESPACE_ENTER
|
||||
|
||||
MatrixGenerator::MatrixGenerator()
|
||||
{
|
||||
position_input_ = new NodeInput("pos_in", NodeParam::kVec2);
|
||||
position_input_ = new NodeInput("pos_in", NodeParam::kVec2, QVector2D());
|
||||
AddInput(position_input_);
|
||||
|
||||
rotation_input_ = new NodeInput("rot_in", NodeParam::kFloat);
|
||||
rotation_input_ = new NodeInput("rot_in", NodeParam::kFloat, 0.0f);
|
||||
AddInput(rotation_input_);
|
||||
|
||||
scale_input_ = new NodeInput("scale_in", NodeParam::kVec2, QVector2D(1.0f, 1.0f));
|
||||
@@ -48,7 +48,7 @@ MatrixGenerator::MatrixGenerator()
|
||||
connect(uniform_scale_input_, &NodeInput::ValueChanged, this, &MatrixGenerator::UniformScaleChanged);
|
||||
AddInput(uniform_scale_input_);
|
||||
|
||||
anchor_input_ = new NodeInput("anchor_in", NodeParam::kVec2);
|
||||
anchor_input_ = new NodeInput("anchor_in", NodeParam::kVec2, QVector2D());
|
||||
AddInput(anchor_input_);
|
||||
}
|
||||
|
||||
|
||||
@@ -386,9 +386,22 @@ void NodeInput::GetDependencies(QList<Node *> &list, bool traverse, bool exclusi
|
||||
|
||||
QVariant NodeInput::GetDefaultValue() const
|
||||
{
|
||||
if (default_value_.isEmpty()) {
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
return combine_track_values_into_normal_value(default_value_);
|
||||
}
|
||||
|
||||
QVariant NodeInput::GetDefaultValueForTrack(int track) const
|
||||
{
|
||||
if (default_value_.isEmpty()) {
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
return default_value_.at(track);
|
||||
}
|
||||
|
||||
QList<Node *> NodeInput::GetDependencies(bool traverse, bool exclusive_only) const
|
||||
{
|
||||
QList<Node *> list;
|
||||
|
||||
@@ -279,6 +279,8 @@ public:
|
||||
|
||||
QVariant GetDefaultValue() const;
|
||||
|
||||
QVariant GetDefaultValueForTrack(int track) const;
|
||||
|
||||
QList<Node*> GetDependencies(bool traverse = true, bool exclusive_only = false) const;
|
||||
|
||||
QList<Node*> GetExclusiveDependencies() const;
|
||||
|
||||
@@ -35,12 +35,12 @@ MathNode::MathNode()
|
||||
method_in_->set_is_keyframable(false);
|
||||
AddInput(method_in_);
|
||||
|
||||
param_a_in_ = new NodeInput(QStringLiteral("param_a_in"), NodeParam::kFloat);
|
||||
param_a_in_ = new NodeInput(QStringLiteral("param_a_in"), NodeParam::kFloat, 0.0);
|
||||
param_a_in_->set_property(QStringLiteral("decimalplaces"), 8);
|
||||
param_a_in_->set_property(QStringLiteral("autotrim"), true);
|
||||
AddInput(param_a_in_);
|
||||
|
||||
param_b_in_ = new NodeInput(QStringLiteral("param_b_in"), NodeParam::kFloat);
|
||||
param_b_in_ = new NodeInput(QStringLiteral("param_b_in"), NodeParam::kFloat, 0.0);
|
||||
param_b_in_->set_property(QStringLiteral("decimalplaces"), 8);
|
||||
param_b_in_->set_property(QStringLiteral("autotrim"), true);
|
||||
AddInput(param_b_in_);
|
||||
|
||||
@@ -29,7 +29,7 @@ TrigonometryNode::TrigonometryNode()
|
||||
method_in_->set_is_keyframable(false);
|
||||
AddInput(method_in_);
|
||||
|
||||
x_in_ = new NodeInput(QStringLiteral("x_in"), NodeParam::kFloat);
|
||||
x_in_ = new NodeInput(QStringLiteral("x_in"), NodeParam::kFloat, 0.0);
|
||||
AddInput(x_in_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user