mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-15 05:40:01 -05:00
Add support to resolve variables on action queue add
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
|
||||
namespace advss {
|
||||
|
||||
const uint32_t MacroActionScreenshot::_version = 1;
|
||||
|
||||
const std::string MacroActionScreenshot::id = "screenshot";
|
||||
|
||||
bool MacroActionScreenshot::_registered = MacroActionFactory::Register(
|
||||
@@ -92,7 +90,7 @@ bool MacroActionScreenshot::Save(obs_data_t *obj) const
|
||||
obs_data_set_int(obj, "saveType", static_cast<int>(_saveType));
|
||||
obs_data_set_int(obj, "targetType", static_cast<int>(_targetType));
|
||||
_path.Save(obj, "savePath");
|
||||
obs_data_set_int(obj, "version", _version);
|
||||
obs_data_set_int(obj, "version", 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -125,6 +123,28 @@ std::string MacroActionScreenshot::GetShortDesc() const
|
||||
return "";
|
||||
}
|
||||
|
||||
std::shared_ptr<MacroAction> MacroActionScreenshot::Create(Macro *m)
|
||||
{
|
||||
return std::make_shared<MacroActionScreenshot>(m);
|
||||
}
|
||||
|
||||
std::shared_ptr<MacroAction> MacroActionScreenshot::Copy() const
|
||||
{
|
||||
auto result = Create(GetMacro());
|
||||
OBSDataAutoRelease data = obs_data_create();
|
||||
Save(data);
|
||||
result->Load(data);
|
||||
result->PostLoad();
|
||||
return result;
|
||||
}
|
||||
|
||||
void MacroActionScreenshot::ResolveVariablesToFixedValues()
|
||||
{
|
||||
_scene.ResolveVariables();
|
||||
_source.ResolveVariables();
|
||||
_path.ResolveVariables();
|
||||
}
|
||||
|
||||
static void populateSaveTypeSelection(QComboBox *list)
|
||||
{
|
||||
list->addItem(obs_module_text(
|
||||
|
||||
Reference in New Issue
Block a user