mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Temporary disabling feature 'follow image processing'
This commit is contained in:
@@ -500,24 +500,24 @@ void ImGuiVisitor::visit (Source& s)
|
||||
oss << s.name() << ": " << "Change Filter";
|
||||
Action::manager().store(oss.str());
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::BeginMenu("Follow"))
|
||||
{
|
||||
for (auto mpit = Mixer::manager().session()->begin();
|
||||
mpit != Mixer::manager().session()->end(); mpit++ )
|
||||
{
|
||||
std::string label = (*mpit)->name();
|
||||
if ( (*mpit)->id() != s.id() &&
|
||||
(*mpit)->imageProcessingEnabled() &&
|
||||
!(*mpit)->processingshader_link_.connected()) {
|
||||
if (ImGui::MenuItem( label.c_str() )){
|
||||
s.processingshader_link_.connect(*mpit);
|
||||
s.touch();
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
// ImGui::Separator();
|
||||
// if (ImGui::BeginMenu("Follow"))
|
||||
// {
|
||||
// for (auto mpit = Mixer::manager().session()->begin();
|
||||
// mpit != Mixer::manager().session()->end(); mpit++ )
|
||||
// {
|
||||
// std::string label = (*mpit)->name();
|
||||
// if ( (*mpit)->id() != s.id() &&
|
||||
// (*mpit)->imageProcessingEnabled() &&
|
||||
// !(*mpit)->processingshader_link_.connected()) {
|
||||
// if (ImGui::MenuItem( label.c_str() )){
|
||||
// s.processingshader_link_.connect(*mpit);
|
||||
// s.touch();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// ImGui::EndMenu();
|
||||
// }
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
@@ -532,7 +532,7 @@ void ImGuiVisitor::visit (Source& s)
|
||||
ImGui::Text("Filters");
|
||||
Source *target = s.processingshader_link_.source();
|
||||
ImGui::Text("Following");
|
||||
if ( ImGui::Button(target->name().c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
|
||||
if ( target != nullptr && ImGui::Button(target->name().c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
|
||||
Mixer::manager().setCurrentSource(target);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -276,6 +276,10 @@ void SessionLoader::load(XMLElement *sessionNode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// loop over SourceLinks and resolve them
|
||||
// NB: this could become the mechanism for clone sources too
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,8 +668,11 @@ void SessionLoader::visit (Source& s)
|
||||
xmlCurrent_ = sourceNode->FirstChildElement("ImageProcessing");
|
||||
if (xmlCurrent_) {
|
||||
bool on = xmlCurrent_->BoolAttribute("enabled", true);
|
||||
uint64_t id__ = 0;
|
||||
xmlCurrent_->QueryUnsigned64Attribute("follow", &id__);
|
||||
s.processingShader()->accept(*this);
|
||||
s.setImageProcessingEnabled(on);
|
||||
s.processingshader_link_.connect(id__, session_);
|
||||
}
|
||||
|
||||
xmlCurrent_ = sourceNode->FirstChildElement("MixingGroup");
|
||||
|
||||
@@ -441,6 +441,7 @@ void SessionVisitor::visit (Source& s)
|
||||
|
||||
xmlCurrent_ = xmlDoc_->NewElement( "ImageProcessing" );
|
||||
xmlCurrent_->SetAttribute("enabled", s.imageProcessingEnabled());
|
||||
xmlCurrent_->SetAttribute("follow", s.processingshader_link_.id());
|
||||
sourceNode->InsertEndChild(xmlCurrent_);
|
||||
s.processingShader()->accept(*this);
|
||||
|
||||
|
||||
@@ -169,9 +169,9 @@ Source *SourceLink::source()
|
||||
target_ = *it;
|
||||
target_->links_.push_back(this);
|
||||
}
|
||||
// not found: invalidate link
|
||||
else
|
||||
disconnect();
|
||||
// // not found: invalidate link
|
||||
// else
|
||||
// disconnect();
|
||||
}
|
||||
// no host: invalidate link
|
||||
else
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
bool connected() { return id_ > 0; }
|
||||
|
||||
Source *source();
|
||||
inline uint64_t id() { return id_; }
|
||||
|
||||
protected:
|
||||
Session *host_;
|
||||
|
||||
Reference in New Issue
Block a user