nodes: optimize job infrastructure

Rework traversing so that jobs are only resolved when they are used. This should provide moderate optimize to the traversing process.
This commit is contained in:
itsmattkc
2022-05-03 11:19:21 -07:00
parent 5351e634b0
commit 028d2fd60c
31 changed files with 78 additions and 166 deletions
+3 -2
View File
@@ -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;
}
+2
View File
@@ -143,6 +143,8 @@ private:
QVector<Node*> contexts_;
QVector<Node*> current_contexts_;
bool show_all_nodes_;
private slots:
void UpdateGlobalScrollBar();
@@ -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:
@@ -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: