- save
This commit is contained in:
parent
ac22ea5e75
commit
a27c62f062
49 changed files with 1170 additions and 384 deletions
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
#include "VenoMatrix.h"
|
||||
|
||||
VenoMatrix::VenoMatrix (const std::string& processId) : m_processId (processId)
|
||||
VenoMatrix::VenoMatrix (const std::string& processId) : m_processId(processId)
|
||||
{
|
||||
for (auto& m_slot : m_slots)
|
||||
{
|
||||
m_slot = new VenoMatrixSlot ();
|
||||
m_slot = new VenoMatrixSlot();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -27,22 +27,22 @@ VenoMatrixSlot* VenoMatrix::getSlotById (int id)
|
|||
|
||||
void VenoMatrix::removeModulateValue (const std::string& name)
|
||||
{
|
||||
m_modulationValues.erase (name);
|
||||
m_modulationValues.erase(name);
|
||||
}
|
||||
|
||||
void VenoMatrix::removeModulator (const std::string& name)
|
||||
{
|
||||
m_modulators.erase (name);
|
||||
m_modulators.erase(name);
|
||||
}
|
||||
|
||||
void VenoMatrix::addModulateValue (const std::string& name, ModulateValue* modulateValue)
|
||||
{
|
||||
m_modulationValues.emplace (std::pair<const std::string&, ModulateValue*> (name, modulateValue));
|
||||
m_modulationValues.emplace(std::pair<const std::string&, ModulateValue*>(name, modulateValue));
|
||||
}
|
||||
|
||||
void VenoMatrix::addModulator (const std::string& name, Modulator* modulator)
|
||||
{
|
||||
m_modulators.emplace (std::pair<const std::string&, Modulator*> (name, modulator));
|
||||
m_modulators.emplace(std::pair<const std::string&, Modulator*>(name, modulator));
|
||||
}
|
||||
|
||||
void VenoMatrix::updateSlots ()
|
||||
|
|
@ -53,26 +53,26 @@ void VenoMatrix::updateSlots ()
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if (m_modulators.find (m_slot->sourceName) != m_modulators.end ())
|
||||
if (m_modulators.find(m_slot->sourceName) != m_modulators.end())
|
||||
{
|
||||
auto modulator = m_modulators[m_slot->sourceName];
|
||||
if (modulator == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
modulator->update ();
|
||||
modulator->update();
|
||||
for (auto& value : m_slot->targets)
|
||||
{
|
||||
if (value.name != "none")
|
||||
{
|
||||
if (m_modulationValues.find (value.name) != m_modulationValues.end ())
|
||||
if (m_modulationValues.find(value.name) != m_modulationValues.end())
|
||||
{
|
||||
auto modValue = m_modulationValues[value.name];
|
||||
if (modValue == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
modValue->addValue (modulator->getValue () * value.amount);
|
||||
modValue->addValue(modulator->getValue() * value.amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue