Enable getting varaible values from conditions and actions

This commit is contained in:
WarmUpTill
2023-01-07 02:04:21 +01:00
committed by WarmUpTill
parent 1fd6f75ee1
commit 42773790e4
6 changed files with 91 additions and 11 deletions

View File

@@ -1,6 +1,11 @@
#include "macro-action.hpp"
#include "advanced-scene-switcher.hpp"
MacroAction::MacroAction(Macro *m, bool supportsVariableValue)
: MacroSegment(m, supportsVariableValue)
{
}
bool MacroAction::Save(obs_data_t *obj) const
{
MacroSegment::Save(obj);
@@ -19,11 +24,21 @@ void MacroAction::LogAction() const
vblog(LOG_INFO, "performed action %s", GetId().c_str());
}
MacroRefAction::MacroRefAction(Macro *m, bool supportsVariableValue)
: MacroAction(m, supportsVariableValue)
{
}
void MacroRefAction::ResolveMacroRef()
{
_macro.UpdateRef();
}
MultiMacroRefAction::MultiMacroRefAction(Macro *m, bool supportsVariableValue)
: MacroAction(m, supportsVariableValue)
{
}
void MultiMacroRefAction::ResolveMacroRef()
{
for (auto &m : _macros) {