mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
New Geometry source callback
Set Geometry callback applies and interpolates position, scale and rotation of a source. Implemented UI and XML.
This commit is contained in:
@@ -589,9 +589,9 @@ void SessionVisitor::visit (Source& s)
|
||||
std::list<SourceCallback *> callbacks = s.inputCallbacks(*i);
|
||||
for (auto c = callbacks.begin(); c != callbacks.end(); ++c) {
|
||||
xmlCurrent_ = xmlDoc_->NewElement( "Callback" );
|
||||
callbackselement->InsertEndChild(xmlCurrent_);
|
||||
xmlCurrent_->SetAttribute("input", *i);
|
||||
(*c)->accept(*this);
|
||||
callbackselement->InsertEndChild(xmlCurrent_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -784,6 +784,22 @@ void SessionVisitor::visit (SetDepth &c)
|
||||
xmlCurrent_->SetAttribute("bidirectional", c.bidirectional());
|
||||
}
|
||||
|
||||
void SessionVisitor::visit (SetGeometry &c)
|
||||
{
|
||||
xmlCurrent_->SetAttribute("duration", c.duration());
|
||||
xmlCurrent_->SetAttribute("bidirectional", c.bidirectional());
|
||||
|
||||
// get geometry of target
|
||||
Group g;
|
||||
c.getTarget(&g);
|
||||
|
||||
XMLElement *geom = xmlDoc_->NewElement( "Geometry" );
|
||||
xmlCurrent_->InsertEndChild(geom);
|
||||
xmlCurrent_ = geom;
|
||||
g.accept(*this);
|
||||
|
||||
}
|
||||
|
||||
void SessionVisitor::visit (Loom &c)
|
||||
{
|
||||
xmlCurrent_->SetAttribute("delta", c.value());
|
||||
|
||||
Reference in New Issue
Block a user