mathnode: implemented add/subtract/multiply/divide/power functions
Includes implementing combobox UI for the NodeParamViewWidgetBridge.
This commit is contained in:
@@ -67,7 +67,7 @@ bool OpenGLProxy::Init()
|
||||
return true;
|
||||
}
|
||||
|
||||
void OpenGLProxy::FrameToValue(FramePtr frame, StreamPtr stream, const TimeRange &range, NodeValueTable* table)
|
||||
void OpenGLProxy::FrameToValue(FramePtr frame, StreamPtr stream, NodeValueTable* table)
|
||||
{
|
||||
// Ensure stream is video or image type
|
||||
if (stream->type() != Stream::kVideo && stream->type() != Stream::kImage) {
|
||||
@@ -289,6 +289,9 @@ void OpenGLProxy::RunNodeAccelerated(const Node *node, const TimeRange &range, c
|
||||
case NodeInput::kMatrix:
|
||||
shader->setUniformValue(variable_location, value.value<QMatrix4x4>());
|
||||
break;
|
||||
case NodeInput::kCombo:
|
||||
shader->setUniformValue(variable_location, value.value<int>());
|
||||
break;
|
||||
case NodeInput::kColor:
|
||||
{
|
||||
Color color = value.value<Color>();
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
void Close();
|
||||
|
||||
void FrameToValue(FramePtr frame, StreamPtr stream, const TimeRange &range, NodeValueTable* table);
|
||||
void FrameToValue(FramePtr frame, StreamPtr stream, NodeValueTable* table);
|
||||
|
||||
void RunNodeAccelerated(const Node *node, const TimeRange &range, const NodeValueDatabase &input_params, NodeValueTable* output_params);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ void OpenGLWorker::FrameToValue(DecoderPtr decoder, StreamPtr stream, const Time
|
||||
FramePtr frame = decoder->RetrieveVideo(range.in(), video_params().divider());
|
||||
|
||||
if (frame) {
|
||||
emit RequestFrameToValue(frame, stream, range, table);
|
||||
emit RequestFrameToValue(frame, stream, table);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
QObject* parent = nullptr);
|
||||
|
||||
signals:
|
||||
void RequestFrameToValue(FramePtr frame, StreamPtr stream, const TimeRange &range, NodeValueTable* table);
|
||||
void RequestFrameToValue(FramePtr frame, StreamPtr stream, NodeValueTable* table);
|
||||
|
||||
void RequestRunNodeAccelerated(const Node *node, const TimeRange &range, const NodeValueDatabase &input_params, NodeValueTable* output_params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user