mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 00:05:41 -05:00
Adjust video condition temp vars
Some checks are pending
debian-build / build (push) Waiting to run
Check locale / ubuntu64 (push) Waiting to run
Push to master / Check Formatting 🔍 (push) Waiting to run
Push to master / Build Project 🧱 (push) Waiting to run
Push to master / Create Release 🛫 (push) Blocked by required conditions
Some checks are pending
debian-build / build (push) Waiting to run
Check locale / ubuntu64 (push) Waiting to run
Push to master / Check Formatting 🔍 (push) Waiting to run
Push to master / Build Project 🧱 (push) Waiting to run
Push to master / Create Release 🛫 (push) Blocked by required conditions
This commit is contained in:
@@ -377,13 +377,19 @@ bool MacroConditionVideo::CheckColor()
|
||||
_screenshotData.GetImage(), _colorParameters.color,
|
||||
_colorParameters.colorThreshold,
|
||||
_colorParameters.matchThreshold);
|
||||
// Way too slow for now
|
||||
//SetTempVarValue("dominantColor", GetDominantColor(_screenshotData.image, 3)
|
||||
// .name(QColor::HexArgb)
|
||||
// .toStdString());
|
||||
SetTempVarValue("color", GetAverageColor(_screenshotData.GetImage())
|
||||
.name(QColor::HexArgb)
|
||||
.toStdString());
|
||||
|
||||
SetTempVarValue("color", [&]() {
|
||||
return GetAverageColor(_screenshotData.GetImage())
|
||||
.name(QColor::HexArgb)
|
||||
.toStdString();
|
||||
});
|
||||
|
||||
SetTempVarValue("dominantColor", [&]() {
|
||||
return GetDominantColor(_screenshotData.GetImage(), 3)
|
||||
.name(QColor::HexArgb)
|
||||
.toStdString();
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -479,6 +485,12 @@ void MacroConditionVideo::SetupTempVars()
|
||||
obs_module_text("AdvSceneSwitcher.tempVar.video.color"),
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.tempVar.video.color.description"));
|
||||
AddTempvar(
|
||||
"dominantColor",
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.tempVar.video.dominantColor"),
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.tempVar.video.dominantColor.description"));
|
||||
break;
|
||||
case VideoCondition::MATCH:
|
||||
case VideoCondition::DIFFER:
|
||||
|
||||
Reference in New Issue
Block a user