build: split the engine into liboakengine.so; worker drops the UI entirely
Physical split: app/{audio,cli,codec,common,config,node,pluginSupport,
render,task,timeline,undo,tool,shaders} plus coreengine, version and
ui/icons+colorcoding move to a new top-level engine/ tree, built as
liboakengine.so (shared). The render backends (oakgl/oakvulkan) move
with it and link the engine library instead of embedding a static
render-core subset (libolive-rendercore is gone).
- oak-render-worker now links liboakengine instead of the whole
libolive-editor object set: 336MB -> 2.9MB, no Qt Widgets UI
- the editor links liboakengine for the engine and keeps only UI
objects in libolive-editor
- install/packaging: GNUInstallDirs libdir on Linux, bundle copy on
macOS, oakengine.dll staged for NSIS, AppImage validation entry
- fix backend lookup for the new layout: DynamicRenderer searched
../app but backends now live in engine/; a stale pre-split liboakgl
in the build tree got dlopened instead, re-initialized and later
destroyed the interposed engine statics (full-suite segfault at
DialogSequenceParameterTab, found via gdb watchpoint)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2022 Olive Team
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
add_subdirectory(multicam)
|
||||
add_subdirectory(time)
|
||||
add_subdirectory(value)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2022 Olive Team
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/input/multicam/multicamnode.h
|
||||
node/input/multicam/multicamnode.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
* Oak Video Editor - Non-Linear Video Editor
|
||||
* Copyright (C) 2025 Olive CE Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "multicamnode.h"
|
||||
|
||||
#include "node/project/sequence/sequence.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
#define super Node
|
||||
|
||||
const QString MultiCamNode::k_current_input = QStringLiteral("current_in");
|
||||
const QString MultiCamNode::k_sources_input = QStringLiteral("sources_in");
|
||||
const QString MultiCamNode::k_sequence_input = QStringLiteral("sequence_in");
|
||||
const QString MultiCamNode::k_sequence_type_input =
|
||||
QStringLiteral("sequence_type_in");
|
||||
|
||||
MultiCamNode::MultiCamNode()
|
||||
{
|
||||
add_input(k_current_input, NodeValue::k_combo, InputFlags(k_input_flag_static));
|
||||
|
||||
add_input(k_sources_input, NodeValue::k_none,
|
||||
InputFlags(k_input_flag_not_keyframable | k_input_flag_array));
|
||||
set_input_property(k_sources_input, QStringLiteral("arraystart"), 1);
|
||||
|
||||
add_input(k_sequence_input, NodeValue::k_none,
|
||||
InputFlags(k_input_flag_not_keyframable));
|
||||
add_input(k_sequence_type_input, NodeValue::k_combo,
|
||||
InputFlags(k_input_flag_static | k_input_flag_hidden));
|
||||
|
||||
sequence_ = nullptr;
|
||||
}
|
||||
|
||||
QString MultiCamNode::name() const
|
||||
{
|
||||
return tr("Multi-Cam");
|
||||
}
|
||||
|
||||
QString MultiCamNode::id() const
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.multicam");
|
||||
}
|
||||
|
||||
QVector<Node::CategoryID> MultiCamNode::category() const
|
||||
{
|
||||
return { k_category_timeline };
|
||||
}
|
||||
|
||||
QString MultiCamNode::description() const
|
||||
{
|
||||
return tr("Allows easy switching between multiple sources.");
|
||||
}
|
||||
|
||||
Node::ActiveElements
|
||||
MultiCamNode::get_active_elements_at_time(const QString &input,
|
||||
const TimeRange &r) const
|
||||
{
|
||||
if (input == k_sources_input) {
|
||||
int src = get_current_source();
|
||||
if (src >= 0 && src < get_source_count()) {
|
||||
Node::ActiveElements a;
|
||||
a.add(src);
|
||||
return a;
|
||||
} else {
|
||||
return ActiveElements::k_no_elements;
|
||||
}
|
||||
} else {
|
||||
return super::get_active_elements_at_time(input, r);
|
||||
}
|
||||
}
|
||||
|
||||
void MultiCamNode::value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const
|
||||
{
|
||||
NodeValueArray arr = value[k_sources_input].to_array();
|
||||
if (!arr.empty()) {
|
||||
table->push(arr.begin()->second);
|
||||
}
|
||||
}
|
||||
|
||||
void MultiCamNode::index_to_row_cols(int index, int total_rows, int total_cols,
|
||||
int *row, int *col)
|
||||
{
|
||||
Q_UNUSED(total_rows)
|
||||
|
||||
*col = index % total_cols;
|
||||
*row = index / total_cols;
|
||||
}
|
||||
|
||||
Node *MultiCamNode::get_connected_render_output(const QString &input,
|
||||
int element) const
|
||||
{
|
||||
if (sequence_ && input == k_sources_input && element >= 0 &&
|
||||
element < get_source_count()) {
|
||||
return get_track_list()->get_track_at(element);
|
||||
} else {
|
||||
return Node::get_connected_render_output(input, element);
|
||||
}
|
||||
}
|
||||
|
||||
bool MultiCamNode::is_input_connected_for_render(const QString &input,
|
||||
int element) const
|
||||
{
|
||||
if (sequence_ && input == k_sources_input && element >= 0 &&
|
||||
element < get_source_count()) {
|
||||
return true;
|
||||
} else {
|
||||
return Node::is_input_connected_for_render(input, element);
|
||||
}
|
||||
}
|
||||
|
||||
QVector<QString> MultiCamNode::ignore_inputs_for_rendering() const
|
||||
{
|
||||
return { k_sequence_input };
|
||||
}
|
||||
|
||||
void MultiCamNode::InputConnectedEvent(const QString &input, int element,
|
||||
Node *output)
|
||||
{
|
||||
if (input == k_sequence_input) {
|
||||
if (Sequence *s = dynamic_cast<Sequence *>(output)) {
|
||||
set_input_flag(k_sequence_type_input, k_input_flag_hidden, false);
|
||||
sequence_ = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MultiCamNode::InputDisconnectedEvent(const QString &input, int element,
|
||||
Node *output)
|
||||
{
|
||||
if (input == k_sequence_input) {
|
||||
set_input_flag(k_sequence_type_input, k_input_flag_hidden, true);
|
||||
sequence_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
TrackList *MultiCamNode::get_track_list() const
|
||||
{
|
||||
return sequence_->track_list(
|
||||
static_cast<Track::Type>(get_standard_value(k_sequence_type_input).toInt()));
|
||||
}
|
||||
|
||||
void MultiCamNode::retranslate()
|
||||
{
|
||||
super::retranslate();
|
||||
|
||||
set_input_name(k_current_input, tr("Current"));
|
||||
set_input_name(k_sources_input, tr("Sources"));
|
||||
set_input_name(k_sequence_input, tr("Sequence"));
|
||||
set_input_name(k_sequence_type_input, tr("Sequence Type"));
|
||||
set_combo_box_strings(k_sequence_type_input, { tr("Video"), tr("Audio") });
|
||||
|
||||
QStringList names;
|
||||
int name_count = get_source_count();
|
||||
names.reserve(name_count);
|
||||
for (int i = 0; i < name_count; i++) {
|
||||
QString src_name;
|
||||
if (Node *n = get_connected_render_output(k_sources_input, i)) {
|
||||
src_name = n->name();
|
||||
}
|
||||
names.append(tr("%1: %2").arg(QString::number(i + 1), src_name));
|
||||
}
|
||||
set_combo_box_strings(k_current_input, names);
|
||||
}
|
||||
|
||||
int MultiCamNode::get_source_count() const
|
||||
{
|
||||
if (sequence_) {
|
||||
return get_track_list()->get_track_count();
|
||||
} else {
|
||||
return input_array_size(k_sources_input);
|
||||
}
|
||||
}
|
||||
|
||||
void MultiCamNode::get_rows_and_columns(int sources, int *rows_in, int *cols_in)
|
||||
{
|
||||
int &rows = *rows_in;
|
||||
int &cols = *cols_in;
|
||||
|
||||
rows = 1;
|
||||
cols = 1;
|
||||
while (rows * cols < sources) {
|
||||
if (rows < cols) {
|
||||
rows++;
|
||||
} else {
|
||||
cols++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Oak Video Editor - Non-Linear Video Editor
|
||||
* Copyright (C) 2025 Olive CE Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OAK_MULTICAMNODE_H
|
||||
#define OAK_MULTICAMNODE_H
|
||||
|
||||
#include "node/node.h"
|
||||
#include "node/output/track/tracklist.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
class Sequence;
|
||||
|
||||
class MultiCamNode : public Node {
|
||||
Q_OBJECT
|
||||
public:
|
||||
MultiCamNode();
|
||||
|
||||
NODE_DEFAULT_FUNCTIONS(MultiCamNode)
|
||||
|
||||
virtual QString name() const override;
|
||||
virtual QString id() const override;
|
||||
virtual QVector<CategoryID> category() const override;
|
||||
virtual QString description() const override;
|
||||
|
||||
virtual ActiveElements
|
||||
get_active_elements_at_time(const QString &input,
|
||||
const TimeRange &r) const override;
|
||||
|
||||
virtual void value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const override;
|
||||
|
||||
virtual void retranslate() override;
|
||||
|
||||
static const QString k_current_input;
|
||||
static const QString k_sources_input;
|
||||
static const QString k_sequence_input;
|
||||
static const QString k_sequence_type_input;
|
||||
|
||||
int get_current_source() const
|
||||
{
|
||||
return get_standard_value(k_current_input).toInt();
|
||||
}
|
||||
|
||||
int get_source_count() const;
|
||||
|
||||
static void get_rows_and_columns(int sources, int *rows, int *cols);
|
||||
void get_rows_and_columns(int *rows, int *cols) const
|
||||
{
|
||||
return get_rows_and_columns(get_source_count(), rows, cols);
|
||||
}
|
||||
|
||||
void set_sequence_type(Track::Type t)
|
||||
{
|
||||
set_standard_value(k_sequence_type_input, t);
|
||||
}
|
||||
|
||||
static void index_to_row_cols(int index, int total_rows, int total_cols,
|
||||
int *row, int *col);
|
||||
|
||||
static int rows_cols_to_index(int row, int col, int total_rows, int total_cols)
|
||||
{
|
||||
return col + row * total_cols;
|
||||
}
|
||||
|
||||
virtual Node *get_connected_render_output(const QString &input,
|
||||
int element = -1) const override;
|
||||
virtual bool is_input_connected_for_render(const QString &input,
|
||||
int element = -1) const override;
|
||||
|
||||
virtual QVector<QString> ignore_inputs_for_rendering() const override;
|
||||
|
||||
protected:
|
||||
virtual void InputConnectedEvent(const QString &input, int element,
|
||||
Node *output) override;
|
||||
virtual void InputDisconnectedEvent(const QString &input, int element,
|
||||
Node *output) override;
|
||||
|
||||
private:
|
||||
TrackList *get_track_list() const;
|
||||
|
||||
Sequence *sequence_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // OAK_MULTICAMNODE_H
|
||||
@@ -0,0 +1,22 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2022 Olive Team
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/input/time/timeinput.h
|
||||
node/input/time/timeinput.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -0,0 +1,60 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2022 Olive Team
|
||||
Modifications Copyright (C) 2025 mikesolar
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#include "timeinput.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
#define super Node
|
||||
|
||||
TimeInput::TimeInput()
|
||||
{
|
||||
}
|
||||
|
||||
QString TimeInput::name() const
|
||||
{
|
||||
return tr("Time");
|
||||
}
|
||||
|
||||
QString TimeInput::id() const
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.time");
|
||||
}
|
||||
|
||||
QVector<Node::CategoryID> TimeInput::category() const
|
||||
{
|
||||
return { k_category_time };
|
||||
}
|
||||
|
||||
QString TimeInput::description() const
|
||||
{
|
||||
return tr("Generates the time (in seconds) at this frame.");
|
||||
}
|
||||
|
||||
void TimeInput::value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const
|
||||
{
|
||||
table->push(NodeValue::k_float, globals.time().in().to_double(), this, false,
|
||||
QStringLiteral("time"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2022 Olive Team
|
||||
Modifications Copyright (C) 2025 mikesolar
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#ifndef OAK_TIMEINPUT_H
|
||||
#define OAK_TIMEINPUT_H
|
||||
|
||||
#include "node/node.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
class TimeInput : public Node {
|
||||
Q_OBJECT
|
||||
public:
|
||||
TimeInput();
|
||||
|
||||
NODE_DEFAULT_FUNCTIONS(TimeInput)
|
||||
|
||||
virtual QString name() const override;
|
||||
virtual QString id() const override;
|
||||
virtual QVector<CategoryID> category() const override;
|
||||
virtual QString description() const override;
|
||||
|
||||
virtual void value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // OAK_TIMEINPUT_H
|
||||
@@ -0,0 +1,22 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2022 Olive Team
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/input/value/valuenode.h
|
||||
node/input/value/valuenode.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2022 Olive Team
|
||||
Modifications Copyright (C) 2025 mikesolar
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#include "valuenode.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
const QString ValueNode::k_type_input = QStringLiteral("type_in");
|
||||
const QString ValueNode::k_value_input = QStringLiteral("value_in");
|
||||
const QVector<NodeValue::Type> ValueNode::k_supported_types = {
|
||||
NodeValue::k_float, NodeValue::k_int, NodeValue::k_rational,
|
||||
NodeValue::k_vec2, NodeValue::k_vec3, NodeValue::k_vec4,
|
||||
NodeValue::k_color, NodeValue::k_text, NodeValue::k_matrix,
|
||||
NodeValue::k_font, NodeValue::k_boolean,
|
||||
};
|
||||
|
||||
#define super Node
|
||||
|
||||
ValueNode::ValueNode()
|
||||
{
|
||||
add_input(k_type_input, NodeValue::k_combo, 0,
|
||||
InputFlags(k_input_flag_not_connectable | k_input_flag_not_keyframable));
|
||||
|
||||
add_input(k_value_input, k_supported_types.first(), QVariant(),
|
||||
InputFlags(k_input_flag_not_connectable));
|
||||
}
|
||||
|
||||
void ValueNode::retranslate()
|
||||
{
|
||||
super::retranslate();
|
||||
|
||||
set_input_name(k_type_input, QStringLiteral("Type"));
|
||||
set_input_name(k_value_input, QStringLiteral("Value"));
|
||||
|
||||
QStringList type_names;
|
||||
type_names.reserve(k_supported_types.size());
|
||||
foreach (NodeValue::Type type, k_supported_types) {
|
||||
type_names.append(NodeValue::get_pretty_data_type_name(type));
|
||||
}
|
||||
set_combo_box_strings(k_type_input, type_names);
|
||||
}
|
||||
|
||||
void ValueNode::value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const
|
||||
{
|
||||
Q_UNUSED(globals)
|
||||
|
||||
// Ensure value is pushed onto the table
|
||||
table->push(value[k_value_input]);
|
||||
}
|
||||
|
||||
void ValueNode::InputValueChangedEvent(const QString &input, int element)
|
||||
{
|
||||
if (input == k_type_input) {
|
||||
set_input_data_type(
|
||||
k_value_input,
|
||||
k_supported_types.at(get_standard_value(k_type_input).toInt()));
|
||||
}
|
||||
|
||||
super::InputValueChangedEvent(input, element);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2022 Olive Team
|
||||
Modifications Copyright (C) 2025 mikesolar
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#ifndef OAK_VALUENODE_H
|
||||
#define OAK_VALUENODE_H
|
||||
|
||||
#include "node/node.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
class ValueNode : public Node {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ValueNode();
|
||||
|
||||
NODE_DEFAULT_FUNCTIONS(ValueNode)
|
||||
|
||||
virtual QString name() const override
|
||||
{
|
||||
return tr("Value");
|
||||
}
|
||||
|
||||
virtual QString id() const override
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.value");
|
||||
}
|
||||
|
||||
virtual QVector<CategoryID> category() const override
|
||||
{
|
||||
return { k_category_generator };
|
||||
}
|
||||
|
||||
virtual QString description() const override
|
||||
{
|
||||
return tr(
|
||||
"Create a single value that can be connected to various other inputs.");
|
||||
}
|
||||
|
||||
static const QString k_type_input;
|
||||
static const QString k_value_input;
|
||||
|
||||
virtual void retranslate() override;
|
||||
|
||||
virtual void value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
NodeValueTable *table) const override;
|
||||
|
||||
protected:
|
||||
virtual void InputValueChangedEvent(const QString &input,
|
||||
int element) override;
|
||||
|
||||
private:
|
||||
static const QVector<NodeValue::Type> k_supported_types;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // OAK_VALUENODE_H
|
||||
Reference in New Issue
Block a user