Add macro input variable support

This commit is contained in:
WarmUpTill
2024-05-31 22:59:44 +02:00
committed by WarmUpTill
parent ee68427036
commit 3480ff238e
8 changed files with 383 additions and 18 deletions

View File

@@ -348,6 +348,11 @@ void Macro::SetMatchOnChange(bool onChange)
_performActionsOnChange = onChange;
}
void Macro::SetStopActionsIfNotDone(bool stopActionsIfNotDone)
{
_stopActionsIfNotDone = stopActionsIfNotDone;
}
void Macro::SetPaused(bool pause)
{
if (_paused && !pause) {
@@ -382,6 +387,16 @@ void Macro::Stop()
}
}
MacroInputVariables Macro::GetInputVariables() const
{
return _inputVariables;
}
void Macro::SetInputVariables(const MacroInputVariables &inputVariables)
{
_inputVariables = inputVariables;
}
std::vector<TempVariable> Macro::GetTempVars(MacroSegment *filter) const
{
std::vector<TempVariable> res;
@@ -610,6 +625,8 @@ bool Macro::Save(obs_data_t *obj) const
}
obs_data_set_array(obj, "elseActions", elseActions);
_inputVariables.Save(obj);
return true;
}
@@ -748,6 +765,8 @@ bool Macro::Load(obs_data_t *obj)
}
UpdateElseActionIndices();
_inputVariables.Load(obj);
return true;
}