mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 10:49:59 +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";
|
oss << s.name() << ": " << "Change Filter";
|
||||||
Action::manager().store(oss.str());
|
Action::manager().store(oss.str());
|
||||||
}
|
}
|
||||||
ImGui::Separator();
|
// ImGui::Separator();
|
||||||
if (ImGui::BeginMenu("Follow"))
|
// if (ImGui::BeginMenu("Follow"))
|
||||||
{
|
// {
|
||||||
for (auto mpit = Mixer::manager().session()->begin();
|
// for (auto mpit = Mixer::manager().session()->begin();
|
||||||
mpit != Mixer::manager().session()->end(); mpit++ )
|
// mpit != Mixer::manager().session()->end(); mpit++ )
|
||||||
{
|
// {
|
||||||
std::string label = (*mpit)->name();
|
// std::string label = (*mpit)->name();
|
||||||
if ( (*mpit)->id() != s.id() &&
|
// if ( (*mpit)->id() != s.id() &&
|
||||||
(*mpit)->imageProcessingEnabled() &&
|
// (*mpit)->imageProcessingEnabled() &&
|
||||||
!(*mpit)->processingshader_link_.connected()) {
|
// !(*mpit)->processingshader_link_.connected()) {
|
||||||
if (ImGui::MenuItem( label.c_str() )){
|
// if (ImGui::MenuItem( label.c_str() )){
|
||||||
s.processingshader_link_.connect(*mpit);
|
// s.processingshader_link_.connect(*mpit);
|
||||||
s.touch();
|
// s.touch();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
ImGui::EndMenu();
|
// ImGui::EndMenu();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
@@ -532,7 +532,7 @@ void ImGuiVisitor::visit (Source& s)
|
|||||||
ImGui::Text("Filters");
|
ImGui::Text("Filters");
|
||||||
Source *target = s.processingshader_link_.source();
|
Source *target = s.processingshader_link_.source();
|
||||||
ImGui::Text("Following");
|
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);
|
Mixer::manager().setCurrentSource(target);
|
||||||
}
|
}
|
||||||
else
|
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");
|
xmlCurrent_ = sourceNode->FirstChildElement("ImageProcessing");
|
||||||
if (xmlCurrent_) {
|
if (xmlCurrent_) {
|
||||||
bool on = xmlCurrent_->BoolAttribute("enabled", true);
|
bool on = xmlCurrent_->BoolAttribute("enabled", true);
|
||||||
|
uint64_t id__ = 0;
|
||||||
|
xmlCurrent_->QueryUnsigned64Attribute("follow", &id__);
|
||||||
s.processingShader()->accept(*this);
|
s.processingShader()->accept(*this);
|
||||||
s.setImageProcessingEnabled(on);
|
s.setImageProcessingEnabled(on);
|
||||||
|
s.processingshader_link_.connect(id__, session_);
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlCurrent_ = sourceNode->FirstChildElement("MixingGroup");
|
xmlCurrent_ = sourceNode->FirstChildElement("MixingGroup");
|
||||||
|
|||||||
@@ -441,6 +441,7 @@ void SessionVisitor::visit (Source& s)
|
|||||||
|
|
||||||
xmlCurrent_ = xmlDoc_->NewElement( "ImageProcessing" );
|
xmlCurrent_ = xmlDoc_->NewElement( "ImageProcessing" );
|
||||||
xmlCurrent_->SetAttribute("enabled", s.imageProcessingEnabled());
|
xmlCurrent_->SetAttribute("enabled", s.imageProcessingEnabled());
|
||||||
|
xmlCurrent_->SetAttribute("follow", s.processingshader_link_.id());
|
||||||
sourceNode->InsertEndChild(xmlCurrent_);
|
sourceNode->InsertEndChild(xmlCurrent_);
|
||||||
s.processingShader()->accept(*this);
|
s.processingShader()->accept(*this);
|
||||||
|
|
||||||
|
|||||||
@@ -169,9 +169,9 @@ Source *SourceLink::source()
|
|||||||
target_ = *it;
|
target_ = *it;
|
||||||
target_->links_.push_back(this);
|
target_->links_.push_back(this);
|
||||||
}
|
}
|
||||||
// not found: invalidate link
|
// // not found: invalidate link
|
||||||
else
|
// else
|
||||||
disconnect();
|
// disconnect();
|
||||||
}
|
}
|
||||||
// no host: invalidate link
|
// no host: invalidate link
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public:
|
|||||||
bool connected() { return id_ > 0; }
|
bool connected() { return id_ > 0; }
|
||||||
|
|
||||||
Source *source();
|
Source *source();
|
||||||
|
inline uint64_t id() { return id_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Session *host_;
|
Session *host_;
|
||||||
|
|||||||
Reference in New Issue
Block a user