diff --git a/app/node/audio/pan/pan.cpp b/app/node/audio/pan/pan.cpp index 5e6d87a39..482bf075f 100644 --- a/app/node/audio/pan/pan.cpp +++ b/app/node/audio/pan/pan.cpp @@ -95,11 +95,7 @@ void PanNode::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeV } } - if (push_job) { - table->Push(NodeValue::kSampleJob, QVariant::fromValue(job), this); - } else { - table->Push(NodeValue::kSamples, QVariant::fromValue(job.samples()), this); - } + table->Push(NodeValue::kSamples, push_job ? QVariant::fromValue(job) : QVariant::fromValue(job.samples()), this); } } diff --git a/app/node/block/clip/clip.cpp b/app/node/block/clip/clip.cpp index bb5d7188d..a7ce383b2 100644 --- a/app/node/block/clip/clip.cpp +++ b/app/node/block/clip/clip.cpp @@ -56,7 +56,7 @@ ClipBlock::ClipBlock() : AddInput(kMaintainAudioPitchInput, NodeValue::kBoolean, false, InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable)); PrependInput(kBufferIn, NodeValue::kNone, InputFlags(kInputFlagNotKeyframable)); - SetValueHintForInput(kBufferIn, ValueHint(NodeValue::kBuffer)); + //SetValueHintForInput(kBufferIn, ValueHint(NodeValue::kBuffer)); SetEffectInput(kBufferIn); } diff --git a/app/node/block/transition/transition.cpp b/app/node/block/transition/transition.cpp index ddcea3911..97f97a31b 100644 --- a/app/node/block/transition/transition.cpp +++ b/app/node/block/transition/transition.cpp @@ -202,7 +202,7 @@ void TransitionBlock::Value(const NodeValueRow &value, const NodeGlobals &global ShaderJobEvent(value, job); - job_type = NodeValue::kShaderJob; + job_type = NodeValue::kTexture; push_job = QVariant::fromValue(job); } else if (data_type == NodeValue::kSamples) { // This must be an audio transition diff --git a/app/node/distort/cornerpin/cornerpindistortnode.cpp b/app/node/distort/cornerpin/cornerpindistortnode.cpp index febb41061..57129bf3f 100644 --- a/app/node/distort/cornerpin/cornerpindistortnode.cpp +++ b/app/node/distort/cornerpin/cornerpindistortnode.cpp @@ -101,7 +101,7 @@ void CornerPinDistortNode::Value(const NodeValueRow &value, const NodeGlobals &g && job.GetValue(kTopRightInput).data().value().isNull() && job.GetValue(kBottomRightInput).data().value().isNull() && job.GetValue(kBottomLeftInput).data().value().isNull())) { - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } else { table->Push(NodeValue::kTexture, job.GetValue(kTextureInput).data(), this); } diff --git a/app/node/distort/crop/cropdistortnode.cpp b/app/node/distort/crop/cropdistortnode.cpp index 18274109d..5fc6dd56a 100644 --- a/app/node/distort/crop/cropdistortnode.cpp +++ b/app/node/distort/crop/cropdistortnode.cpp @@ -87,7 +87,7 @@ void CropDistortNode::Value(const NodeValueRow &value, const NodeGlobals &global || !qIsNull(job.GetValue(kRightInput).data().toDouble()) || !qIsNull(job.GetValue(kTopInput).data().toDouble()) || !qIsNull(job.GetValue(kBottomInput).data().toDouble())) { - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } else { table->Push(NodeValue::kTexture, job.GetValue(kTextureInput).data(), this); } diff --git a/app/node/distort/flip/flipdistortnode.cpp b/app/node/distort/flip/flipdistortnode.cpp index 21a835e0c..4589b4542 100644 --- a/app/node/distort/flip/flipdistortnode.cpp +++ b/app/node/distort/flip/flipdistortnode.cpp @@ -90,7 +90,7 @@ void FlipDistortNode::Value(const NodeValueRow &value, const NodeGlobals &global if (!job.GetValue(kTextureInput).data().isNull()) { // Only run shader if at least one of flip or flop are selected if (job.GetValue(kHorizontalInput).data().toBool() || job.GetValue(kVerticalInput).data().toBool()) { - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } else { // If we're not flipping or flopping just push the texture table->Push(job.GetValue(kTextureInput)); diff --git a/app/node/distort/transform/transformdistortnode.cpp b/app/node/distort/transform/transformdistortnode.cpp index e60d901f2..d2eb794ea 100644 --- a/app/node/distort/transform/transformdistortnode.cpp +++ b/app/node/distort/transform/transformdistortnode.cpp @@ -107,7 +107,7 @@ void TransformDistortNode::Value(const NodeValueRow &value, const NodeGlobals &g // end up with gaps in the screen that will require an alpha channel. job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn); - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); pushed_job = true; } diff --git a/app/node/effect/opacity/opacityeffect.cpp b/app/node/effect/opacity/opacityeffect.cpp index b4dcba646..6027c2ab3 100644 --- a/app/node/effect/opacity/opacityeffect.cpp +++ b/app/node/effect/opacity/opacityeffect.cpp @@ -53,7 +53,7 @@ void OpacityEffect::Value(const NodeValueRow &value, const NodeGlobals &globals, if (!job.GetValue(kTextureInput).data().isNull()) { if (!qFuzzyCompare(job.GetValue(kValueInput).data().toDouble(), 1.0)) { job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn); - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } else { // 1.0 float is a no-op, so just push the texture table->Push(job.GetValue(kTextureInput)); diff --git a/app/node/filter/blur/blur.cpp b/app/node/filter/blur/blur.cpp index 1865afbca..0452c4fba 100644 --- a/app/node/filter/blur/blur.cpp +++ b/app/node/filter/blur/blur.cpp @@ -35,7 +35,7 @@ BlurFilterNode::BlurFilterNode() { AddInput(kTextureInput, NodeValue::kTexture, InputFlags(kInputFlagNotKeyframable)); - AddInput(kMethodInput, NodeValue::kCombo, 0); + AddInput(kMethodInput, NodeValue::kCombo, 1); // Default to gaussian AddInput(kRadiusInput, NodeValue::kFloat, 10.0); SetInputProperty(kRadiusInput, QStringLiteral("min"), 0.0); @@ -118,7 +118,7 @@ void BlurFilterNode::Value(const NodeValueRow &value, const NodeGlobals &globals job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn); } - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } else { // If we're not performing the blur job, just push the texture diff --git a/app/node/filter/mosaic/mosaicfilternode.cpp b/app/node/filter/mosaic/mosaicfilternode.cpp index e6f5f0545..c198868c5 100644 --- a/app/node/filter/mosaic/mosaicfilternode.cpp +++ b/app/node/filter/mosaic/mosaicfilternode.cpp @@ -66,7 +66,7 @@ void MosaicFilterNode::Value(const NodeValueRow &value, const NodeGlobals &globa if (texture && job.GetValue(kHorizInput).data().toInt() != texture->width() && job.GetValue(kVertInput).data().toInt() != texture->height()) { - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } else { table->Push(job.GetValue(kTextureInput)); } diff --git a/app/node/filter/stroke/stroke.cpp b/app/node/filter/stroke/stroke.cpp index 8883a9047..d0360cc10 100644 --- a/app/node/filter/stroke/stroke.cpp +++ b/app/node/filter/stroke/stroke.cpp @@ -99,7 +99,7 @@ void StrokeFilterNode::Value(const NodeValueRow &value, const NodeGlobals &globa if (!job.GetValue(kTextureInput).data().isNull()) { if (job.GetValue(kRadiusInput).data().toDouble() > 0.0 && job.GetValue(kOpacityInput).data().toDouble() > 0.0) { - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } else { table->Push(job.GetValue(kTextureInput)); } diff --git a/app/node/generator/noise/noise.cpp b/app/node/generator/noise/noise.cpp index 7ed7eb2b9..64ea2266a 100644 --- a/app/node/generator/noise/noise.cpp +++ b/app/node/generator/noise/noise.cpp @@ -80,7 +80,7 @@ void NoiseGeneratorNode::Value(const NodeValueRow &value, const NodeGlobals &glo job.InsertValue(QStringLiteral("time_in"), NodeValue(NodeValue::kFloat, globals.time().in().toDouble(), this)); - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } } diff --git a/app/node/generator/polygon/polygon.cpp b/app/node/generator/polygon/polygon.cpp index c96d5b932..cfccc83c2 100644 --- a/app/node/generator/polygon/polygon.cpp +++ b/app/node/generator/polygon/polygon.cpp @@ -102,7 +102,7 @@ void PolygonGenerator::Value(const NodeValueRow &value, const NodeGlobals &globa job.SetRequestedFormat(VideoParams::kFormatFloat32); job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn); - table->Push(NodeValue::kGenerateJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } void PolygonGenerator::GenerateFrame(FramePtr frame, const GenerateJob &job) const diff --git a/app/node/generator/shape/shapenode.cpp b/app/node/generator/shape/shapenode.cpp index 2d9848c1a..3da5f51a3 100644 --- a/app/node/generator/shape/shapenode.cpp +++ b/app/node/generator/shape/shapenode.cpp @@ -76,7 +76,7 @@ void ShapeNode::Value(const NodeValueRow &value, const NodeGlobals &globals, Nod job.InsertValue(QStringLiteral("resolution_in"), NodeValue(NodeValue::kVec2, globals.resolution(), this)); job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn); - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } } diff --git a/app/node/generator/solid/solid.cpp b/app/node/generator/solid/solid.cpp index 0327af098..713a096a7 100644 --- a/app/node/generator/solid/solid.cpp +++ b/app/node/generator/solid/solid.cpp @@ -70,7 +70,7 @@ void SolidGenerator::Value(const NodeValueRow &value, const NodeGlobals &globals { ShaderJob job; job.InsertValue(value); - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } ShaderCode SolidGenerator::GetShaderCode(const QString &shader_id) const diff --git a/app/node/generator/text/textv1.cpp b/app/node/generator/text/textv1.cpp index 45dd1fad7..9a850d4d4 100644 --- a/app/node/generator/text/textv1.cpp +++ b/app/node/generator/text/textv1.cpp @@ -95,7 +95,7 @@ void TextGeneratorV1::Value(const NodeValueRow &value, const NodeGlobals &global job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn); if (!job.GetValue(kTextInput).data().toString().isEmpty()) { - table->Push(NodeValue::kGenerateJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } } diff --git a/app/node/generator/text/textv2.cpp b/app/node/generator/text/textv2.cpp index b976a58ff..12eb94b06 100644 --- a/app/node/generator/text/textv2.cpp +++ b/app/node/generator/text/textv2.cpp @@ -99,7 +99,7 @@ void TextGeneratorV2::Value(const NodeValueRow &value, const NodeGlobals &global job.SetRequestedFormat(VideoParams::kFormatFloat32); if (!job.GetValue(kTextInput).data().toString().isEmpty()) { - table->Push(NodeValue::kGenerateJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } } diff --git a/app/node/keying/colordifferencekey/colordifferencekey.cpp b/app/node/keying/colordifferencekey/colordifferencekey.cpp index 5770d0f55..39595e039 100644 --- a/app/node/keying/colordifferencekey/colordifferencekey.cpp +++ b/app/node/keying/colordifferencekey/colordifferencekey.cpp @@ -102,7 +102,7 @@ void ColorDifferenceKeyNode::Value(const NodeValueRow &value, const NodeGlobals // If there's no texture, no need to run an operation if (!job.GetValue(kTextureInput).data().isNull()) { - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } } diff --git a/app/node/keying/despill/despill.cpp b/app/node/keying/despill/despill.cpp index 344b1f869..e72124f31 100644 --- a/app/node/keying/despill/despill.cpp +++ b/app/node/keying/despill/despill.cpp @@ -97,7 +97,7 @@ void DespillNode::Value(const NodeValueRow &value, const NodeGlobals &globals, N // If there's no texture, no need to run an operation if (!job.GetValue(kTextureInput).data().isNull()) { - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } } diff --git a/app/node/math/math/mathbase.cpp b/app/node/math/math/mathbase.cpp index 1876416c2..d21e0e613 100644 --- a/app/node/math/math/mathbase.cpp +++ b/app/node/math/math/mathbase.cpp @@ -382,7 +382,7 @@ void MathNodeBase::ValueInternal(Operation operation, Pairing pairing, const QSt output->Push(texture_val); } else { // Push shader job - output->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + output->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } break; } @@ -413,10 +413,10 @@ void MathNodeBase::ValueInternal(Operation operation, Pairing pairing, const QSt output->Push(NodeValue::kSamples, QVariant::fromValue(job.samples()), this); } else { - output->Push(NodeValue::kSampleJob, QVariant::fromValue(job), this); + output->Push(NodeValue::kSamples, QVariant::fromValue(job), this); } } else { - output->Push(NodeValue::kSampleJob, QVariant::fromValue(job), this); + output->Push(NodeValue::kSamples, QVariant::fromValue(job), this); } break; } diff --git a/app/node/math/merge/merge.cpp b/app/node/math/merge/merge.cpp index 5940358aa..1f1c9be42 100644 --- a/app/node/math/merge/merge.cpp +++ b/app/node/math/merge/merge.cpp @@ -101,7 +101,7 @@ void MergeNode::Value(const NodeValueRow &value, const NodeGlobals &globals, Nod job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOff); } - table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this); + table->Push(NodeValue::kTexture, QVariant::fromValue(job), this); } } } diff --git a/app/node/project/footage/footage.cpp b/app/node/project/footage/footage.cpp index de87caa4f..d3c82304f 100644 --- a/app/node/project/footage/footage.cpp +++ b/app/node/project/footage/footage.cpp @@ -341,6 +341,8 @@ void Footage::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeV Track::Reference ref = GetReferenceFromRealIndex(i); FootageJob job(decoder_, filename(), ref.type(), GetLength(), loop_mode); + NodeValue::Type type; + if (ref.type() == Track::kVideo) { VideoParams vp = GetVideoParams(ref.index()); @@ -348,13 +350,17 @@ void Footage::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeV vp.set_colorspace(GetColorspaceToUse(vp)); job.set_video_params(vp); + + type = NodeValue::kTexture; } else { AudioParams ap = GetAudioParams(ref.index()); job.set_audio_params(ap); job.set_cache_path(project()->cache_path()); + + type = NodeValue::kSamples; } - table->Push(NodeValue::kFootageJob, QVariant::fromValue(job), this, false, ref.ToString()); + table->Push(type, QVariant::fromValue(job), this, false, ref.ToString()); } } } diff --git a/app/node/traverser.cpp b/app/node/traverser.cpp index 62dca9c79..d7a28d239 100644 --- a/app/node/traverser.cpp +++ b/app/node/traverser.cpp @@ -52,6 +52,8 @@ NodeValueRow NodeTraverser::GenerateRow(NodeValueDatabase *database, const Node row.insert(it.key(), value); } + PreProcessRow(node, range, row); + return row; } @@ -258,7 +260,6 @@ NodeValueTable NodeTraverser::GenerateTable(const Node *n, const Node::ValueHint if (is_enabled) { NodeValueRow row = GenerateRow(&database, n, range); - //qDebug() << "FIXME: Implement pre-process of row"; // Generate output table NodeValueTable table = database.Merge(); @@ -266,9 +267,6 @@ NodeValueTable NodeTraverser::GenerateTable(const Node *n, const Node::ValueHint // By this point, the node should have all the inputs it needs to render correctly n->Value(row, GenerateGlobals(video_params_, range), &table); - // Post-process table - PostProcessTable(n, hint, range, table); - return table; } else { return database.Merge(); @@ -355,9 +353,8 @@ QVector2D NodeTraverser::GenerateResolution() const return QVector2D(video_params_.square_pixel_width(), video_params_.height()); } -void NodeTraverser::PostProcessTable(const Node *node, const Node::ValueHint &hint, const TimeRange &range, NodeValueTable &output_params) +void NodeTraverser::PreProcessRow(const Node *node, const TimeRange &range, NodeValueRow &row) { - bool got_cached_frame = false; QByteArray cached_node_hash; // Convert footage to image/sample buffers @@ -374,80 +371,53 @@ void NodeTraverser::PostProcessTable(const Node *node, const Node::ValueHint &hi } }*/ - // Strip out any jobs or footage - QList footage_jobs_to_run; - QList shader_jobs_to_run; - QList sample_jobs_to_run; - QList generate_jobs_to_run; + // Resolve any jobs + for (auto it=row.begin(); it!=row.end(); it++) { + // Jobs will almost always be submitted with one of these types + NodeValue &val = it.value(); - for (int i=0; i* take_this_value_list = nullptr; + if (val.type() == NodeValue::kTexture || val.type() == NodeValue::kSamples) { + const QVariant &v = val.data(); - if (v.type() == NodeValue::kFootageJob) { - take_this_value_list = &footage_jobs_to_run; - } else if (v.type() == NodeValue::kShaderJob) { - take_this_value_list = &shader_jobs_to_run; - } else if (v.type() == NodeValue::kSampleJob) { - take_this_value_list = &sample_jobs_to_run; - } else if (v.type() == NodeValue::kGenerateJob) { - take_this_value_list = &generate_jobs_to_run; - } + if (v.canConvert()) { - if (take_this_value_list) { - take_this_value_list->append(output_params.TakeAt(i)); - i--; - } - } + qDebug() << "Running shader for" << val.source(); + val.set_data(QVariant::fromValue(ProcessShader(val.source(), range, v.value()))); - if (!got_cached_frame) { - // Retrieve video frames - foreach (const NodeValue& v, footage_jobs_to_run) { - // Assume this is a VideoStream, we did a type check earlier in the function - FootageJob job = v.data().value(); + } else if (v.canConvert()) { - if (job.type() == Track::kVideo) { - rational footage_time = Footage::AdjustTimeByLoopMode(range.in(), job.loop_mode(), job.length(), job.video_params().video_type(), job.video_params().frame_rate_as_time_base()); + val.set_data(QVariant::fromValue(ProcessFrameGeneration(val.source(), v.value()))); - if (footage_time.isNaN()) { - // Push dummy texture - output_params.Push(NodeValue::kTexture, QVariant::fromValue(CreateDummyTexture(job.video_params())), node, v.array(), v.tag()); - } else { - output_params.Push(NodeValue::kTexture, QVariant::fromValue(ProcessVideoFootage(job, footage_time)), node, v.array(), v.tag()); + } else if (v.canConvert()) { + + FootageJob job = v.value(); + + if (job.type() == Track::kVideo) { + rational footage_time = Footage::AdjustTimeByLoopMode(range.in(), job.loop_mode(), job.length(), job.video_params().video_type(), job.video_params().frame_rate_as_time_base()); + + if (footage_time.isNaN()) { + // Push dummy texture + val.set_data(QVariant::fromValue(CreateDummyTexture(job.video_params()))); + } else { + val.set_data(QVariant::fromValue(ProcessVideoFootage(job, footage_time))); + } + } else if (job.type() == Track::kAudio) { + val.set_data(QVariant::fromValue(ProcessAudioFootage(job, range))); } + + } else if (v.canConvert()) { + + val.set_data(QVariant::fromValue(ProcessSamples(node, range, v.value()))); + } - } - // Run shaders - foreach (const NodeValue& v, shader_jobs_to_run) { - output_params.Push(NodeValue::kTexture, QVariant::fromValue(ProcessShader(node, range, v.data().value())), node, v.array(), v.tag()); - } - - // Run generate jobs - foreach (const NodeValue& v, generate_jobs_to_run) { - output_params.Push(NodeValue::kTexture, QVariant::fromValue(ProcessFrameGeneration(node, v.data().value())), node, v.array(), v.tag()); } } - // Retrieve audio samples - foreach (const NodeValue& v, footage_jobs_to_run) { - // Assume this is an AudioStream, we did a type check earlier in the function - FootageJob job = v.data().value(); - - if (job.type() == Track::kAudio) { - output_params.Push(NodeValue::kSamples, QVariant::fromValue(ProcessAudioFootage(job, range)), node, v.array(), v.tag()); - } - } - - // Run any accelerated shader jobs - foreach (const NodeValue& v, sample_jobs_to_run) { - output_params.Push(NodeValue::kSamples, QVariant::fromValue(ProcessSamples(node, range, v.data().value())), node, v.array(), v.tag()); - } - - if (CanCacheFrames() && node->GetCacheTextures() && !got_cached_frame) { + /*if (CanCacheFrames() && node->GetCacheTextures() && !got_cached_frame) { // Save cached texture SaveCachedTexture(cached_node_hash, output_params.Get(NodeValue::kTexture).value()); - } + }*/ } TexturePtr NodeTraverser::CreateDummyTexture(const VideoParams &p) diff --git a/app/node/traverser.h b/app/node/traverser.h index 839c8561b..3a15455da 100644 --- a/app/node/traverser.h +++ b/app/node/traverser.h @@ -109,7 +109,7 @@ protected: } private: - void PostProcessTable(const Node *node, const Node::ValueHint &hint, const TimeRange &range, NodeValueTable &output_params); + void PreProcessRow(const Node *node, const TimeRange &range, NodeValueRow &row); TexturePtr CreateDummyTexture(const VideoParams &p); diff --git a/app/node/value.cpp b/app/node/value.cpp index d3fa7373b..cdafe2151 100644 --- a/app/node/value.cpp +++ b/app/node/value.cpp @@ -135,12 +135,8 @@ QByteArray NodeValue::ValueToBytes(NodeValue::Type type, const QVariant &value) // These types have no persistent input case kNone: - case kFootageJob: case kTexture: case kSamples: - case kShaderJob: - case kSampleJob: - case kGenerateJob: case kDataTypeCount: break; } @@ -354,10 +350,6 @@ QString NodeValue::GetPrettyDataTypeName(Type type) case kAudioParams: return QCoreApplication::translate("NodeValue", "Audio Parameters"); - case kFootageJob: - case kShaderJob: - case kSampleJob: - case kGenerateJob: case kDataTypeCount: break; } @@ -406,10 +398,6 @@ QString NodeValue::GetDataTypeName(Type type) return QStringLiteral("vparam"); case kAudioParams: return QStringLiteral("aparam"); - case kFootageJob: - case kShaderJob: - case kSampleJob: - case kGenerateJob: case kDataTypeCount: break; } diff --git a/app/node/value.h b/app/node/value.h index 12fb91a33..d894a7d35 100644 --- a/app/node/value.h +++ b/app/node/value.h @@ -172,42 +172,6 @@ public: */ kAudioParams, - /** - * Job type - * - * An internal type used to indicate to the renderer that a footage job needs to - * run. This value will usually be taken from a table and a kTexture or kSamples value will be - * pushed to take its place. - */ - kFootageJob, - - /** - * Job type - * - * An internal type used to indicate to the renderer that an accelerated shader job needs to - * run. This value will usually be taken from a table and a kTexture value will be pushed to - * take its place. - */ - kShaderJob, - - /** - * Job type - * - * An internal type used to indicate to the renderer that an accelerated sample job needs to - * take place. This value will usually be taken from a table and a kSamples value will be - * pushed to take its place. - */ - kSampleJob, - - /** - * Job type - * - * An internal type used to indicate to the renderer that an accelerated sample job needs to - * take place. This value will usually be taken from a table and a kSamples value will be - * pushed to take its place. - */ - kGenerateJob, - /** * End of list */ @@ -244,6 +208,11 @@ public: return data_; } + void set_data(const QVariant& data) + { + data_ = data; + } + const QString& tag() const { return tag_; diff --git a/app/render/opengl/openglrenderer.cpp b/app/render/opengl/openglrenderer.cpp index f270bb568..628ed8f15 100644 --- a/app/render/opengl/openglrenderer.cpp +++ b/app/render/opengl/openglrenderer.cpp @@ -518,10 +518,6 @@ void OpenGLRenderer::Blit(QVariant s, ShaderJob job, Texture *destination, Video case NodeValue::kFile: case NodeValue::kVideoParams: case NodeValue::kAudioParams: - case NodeValue::kShaderJob: - case NodeValue::kSampleJob: - case NodeValue::kGenerateJob: - case NodeValue::kFootageJob: case NodeValue::kBezier: case NodeValue::kNone: case NodeValue::kDataTypeCount: diff --git a/app/widget/nodeparamview/nodeparamview.cpp b/app/widget/nodeparamview/nodeparamview.cpp index 8e3beb82e..49f470da8 100644 --- a/app/widget/nodeparamview/nodeparamview.cpp +++ b/app/widget/nodeparamview/nodeparamview.cpp @@ -39,7 +39,8 @@ NodeParamView::NodeParamView(bool create_keyframe_view, QWidget *parent) : super(true, false, parent), last_scroll_val_(0), focused_node_(nullptr), - time_target_(nullptr) + time_target_(nullptr), + show_all_nodes_(true) { // Create horizontal layout to place scroll area in (and keyframe editing eventually) QHBoxLayout* layout = new QHBoxLayout(this); @@ -453,7 +454,7 @@ void NodeParamView::RemoveContext(Node *ctx) void NodeParamView::AddNode(Node *n, Node *ctx, NodeParamViewContext *context) { - if ((n->GetFlags() & Node::kDontShowInParamView) && !IsGroupMode()) { + if ((n->GetFlags() & Node::kDontShowInParamView) && !IsGroupMode() && !show_all_nodes_) { return; } diff --git a/app/widget/nodeparamview/nodeparamview.h b/app/widget/nodeparamview/nodeparamview.h index c0078b83e..f04072e52 100644 --- a/app/widget/nodeparamview/nodeparamview.h +++ b/app/widget/nodeparamview/nodeparamview.h @@ -143,6 +143,8 @@ private: QVector contexts_; QVector current_contexts_; + bool show_all_nodes_; + private slots: void UpdateGlobalScrollBar(); diff --git a/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp b/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp index 55e92cebc..e030d1b15 100644 --- a/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp +++ b/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp @@ -87,10 +87,6 @@ void NodeParamViewWidgetBridge::CreateWidgets() case NodeValue::kTexture: case NodeValue::kMatrix: case NodeValue::kSamples: - case NodeValue::kFootageJob: - case NodeValue::kShaderJob: - case NodeValue::kSampleJob: - case NodeValue::kGenerateJob: case NodeValue::kVideoParams: case NodeValue::kAudioParams: case NodeValue::kDataTypeCount: @@ -241,10 +237,6 @@ void NodeParamViewWidgetBridge::WidgetCallback() case NodeValue::kTexture: case NodeValue::kMatrix: case NodeValue::kSamples: - case NodeValue::kFootageJob: - case NodeValue::kShaderJob: - case NodeValue::kSampleJob: - case NodeValue::kGenerateJob: case NodeValue::kVideoParams: case NodeValue::kAudioParams: case NodeValue::kDataTypeCount: @@ -422,10 +414,6 @@ void NodeParamViewWidgetBridge::UpdateWidgetValues() case NodeValue::kTexture: case NodeValue::kMatrix: case NodeValue::kSamples: - case NodeValue::kFootageJob: - case NodeValue::kShaderJob: - case NodeValue::kSampleJob: - case NodeValue::kGenerateJob: case NodeValue::kVideoParams: case NodeValue::kAudioParams: case NodeValue::kDataTypeCount: diff --git a/app/widget/nodetableview/nodetableview.cpp b/app/widget/nodetableview/nodetableview.cpp index 9ebee87b4..174b3df3e 100644 --- a/app/widget/nodetableview/nodetableview.cpp +++ b/app/widget/nodetableview/nodetableview.cpp @@ -139,10 +139,6 @@ void NodeTableView::SetTime(const rational &time) switch (value.type()) { case NodeValue::kVideoParams: case NodeValue::kAudioParams: - case NodeValue::kFootageJob: - case NodeValue::kShaderJob: - case NodeValue::kSampleJob: - case NodeValue::kGenerateJob: // These types have no string representation break; case NodeValue::kTexture: