mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add temp var for last recording save path
This commit is contained in:
parent
de20c93b14
commit
2389f37ed6
|
|
@ -2186,6 +2186,8 @@ AdvSceneSwitcher.tempVar.run.process.none.description="When not waiting for the
|
|||
|
||||
AdvSceneSwitcher.tempVar.recording.durationSeconds="Recording duration"
|
||||
AdvSceneSwitcher.tempVar.recording.durationSeconds.description="Recording duration in seconds.\nThis value does not change while the recording is paused and will be reset to zero if the recording is stopped."
|
||||
AdvSceneSwitcher.tempVar.recording.lastSavePath="Last save path"
|
||||
AdvSceneSwitcher.tempVar.recording.lastSavePath.description="The file path of the last saved recording."
|
||||
|
||||
AdvSceneSwitcher.tempVar.video.patternCount="Pattern count"
|
||||
AdvSceneSwitcher.tempVar.video.patternCount.description="The number of times the given pattern has been found in a given video input frame."
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ static int currentRecordingDurationInSeconds = 0;
|
|||
|
||||
bool MacroConditionRecord::CheckCondition()
|
||||
{
|
||||
char *lastSavePath = obs_frontend_get_last_recording();
|
||||
SetTempVarValue("lastSavePath", lastSavePath ? lastSavePath : "");
|
||||
bfree(lastSavePath);
|
||||
|
||||
switch (_condition) {
|
||||
case Condition::STOP:
|
||||
return !obs_frontend_recording_active();
|
||||
|
|
@ -74,6 +78,14 @@ void MacroConditionRecord::SetCondition(Condition condition)
|
|||
void MacroConditionRecord::SetupTempVars()
|
||||
{
|
||||
MacroCondition::SetupTempVars();
|
||||
|
||||
AddTempvar(
|
||||
"lastSavePath",
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.tempVar.recording.lastSavePath"),
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.tempVar.recording.lastSavePath.description"));
|
||||
|
||||
switch (_condition) {
|
||||
case Condition::DURATION:
|
||||
AddTempvar(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user