Commit Graph

445 Commits

Author SHA1 Message Date
WarmUpTill
fd789b476b Persist collapse / expand state 2021-07-22 09:40:31 -07:00
WarmUpTill
3fc82df278 Handle macro control signals 2021-07-22 09:40:31 -07:00
WarmUpTill
d541356fd3 Add macro control widget 2021-07-22 09:40:31 -07:00
WarmUpTill
7200668158 Add option to show frame 2021-07-19 12:13:29 -07:00
WarmUpTill
7cf7fd6112 Show current cursor position 2021-07-19 12:13:29 -07:00
WarmUpTill
41821cbeb2 Add macro condition that triggers if cursor position changed
Extend condition previously named "region"
2021-07-19 12:13:29 -07:00
WarmUpTill
9537579235 Rename macro condition "region" to "cursor" 2021-07-19 12:13:29 -07:00
WarmUpTill
6c8556c66c
Rework cmake and readme (#264)
* Add missing include

* Rework CMakeLists.txt to support out of tree builds

* Update build instructions

* Fix windows build issue and copy locale on Linux

* Update build instructions

* Add downloads section
2021-07-17 17:17:03 +02:00
WarmUpTill
a467dffd05 Fix crash on Fedora 2021-07-13 13:14:43 -07:00
WarmUpTill
497dbd89d4 Fix warning 2021-07-13 13:14:43 -07:00
WarmUpTill
0fdbce25a1 Clean up minor UI inconsistencies 2021-07-13 13:14:43 -07:00
WarmUpTill
7e3e621ae5 Log long condition checks 2021-07-03 09:12:30 -07:00
WarmUpTill
9dfbd266fc Set timeout for libcurl call 2021-07-03 09:12:30 -07:00
WarmUpTill
8d02f63c36 Adjust scene order condition to support current scene 2021-07-03 08:47:08 -07:00
WarmUpTill
f31c54fd72 Adjust scene condition to use SceneSelection 2021-07-03 08:47:08 -07:00
WarmUpTill
7719087065 Add TODO 2021-07-03 08:47:08 -07:00
WarmUpTill
0b175a41d1 Adjust scene transform action to support current scene 2021-07-03 08:47:08 -07:00
WarmUpTill
0824abc4f5 Adjust scene order action to support current scene 2021-07-03 08:47:08 -07:00
WarmUpTill
efef29603b Display all scene items when selecting "current scene" 2021-07-03 08:47:08 -07:00
WarmUpTill
034a1b0c93 Set current scene in handleSceneChange() and reuse it 2021-07-03 08:47:08 -07:00
WarmUpTill
86fefe1e9e Adjust scene visibility action to support current scene 2021-07-03 08:47:08 -07:00
WarmUpTill
0bc15b4c2d Add support for "current scene" to populateSceneSelection() 2021-07-03 08:47:08 -07:00
WarmUpTill
7cfa956b80 Move GetSceneGroupByName functions to scene-group.hpp 2021-07-03 08:47:08 -07:00
WarmUpTill
9670a01e1a Add scene selection class and widget 2021-07-03 08:47:08 -07:00
WarmUpTill
371f6daf5a Add macro condition "date" 2021-06-26 10:23:18 -07:00
WarmUpTill
1c141abd06 Fix plugin state action values being empty 2021-06-26 10:23:09 -07:00
WarmUpTill
13788c2dfa Fix warning 2021-06-26 10:23:09 -07:00
WarmUpTill
daf36365a8 Only use hardcoded libcurl paths as fallback 2021-06-26 10:23:09 -07:00
WarmUpTill
cea4df90b1 Check for invalid transition settings 2021-06-21 11:01:25 -07:00
WarmUpTill
80b824e0a7 Fix Macro slots not being connected properly
Problem was introduced when adding header info.

To avoid the issue in future forward signals of the main plugin window
via condition and action edit widgets instead of relying on parent()
being the main window.
2021-06-20 11:05:29 -07:00
WarmUpTill
0bfdc3890b Add macro action "file" 2021-06-19 12:30:47 -07:00
WarmUpTill
cc067de021 Expand macro action plugin-state to support changing no-match behaviour 2021-06-19 11:29:35 -07:00
WarmUpTill
57c0734ba6 Display more information about macros in collapsed state 2021-06-19 06:58:06 -07:00
WarmUpTill
913682e128 Add support for arguments for macro action "run" 2021-06-19 05:23:10 -07:00
WarmUpTill
92711c5798 Make cleaning of user input optional 2021-06-19 05:23:10 -07:00
WarmUpTill
80334088d0 Add option to only trigger window condition if foreground window changed 2021-06-19 05:22:50 -07:00
WarmUpTill
bdd9d12257 Add setPreconditions()
The idea is to avoid repeated calls to the same functions which lead to
the same outcome, but just calling them once in the precondition checks.

For now move repeated calls of GetCurrentWindowTitle() and ignoreWindow
checks to this function.
2021-06-19 05:22:50 -07:00
WarmUpTill
decee4647b Add macro action 'scene_transform' 2021-06-18 11:15:15 -07:00
WarmUpTill
4991e74a72 Format json string before showing it to user 2021-06-18 11:15:15 -07:00
WarmUpTill
baa158bb33 Add helper fromatJsonString()
obs_data_get_json() will now dump the json data in JSON_COMPACT format
which makes it rather difficult to read.
2021-06-18 11:15:15 -07:00
WarmUpTill
0975ffabfa Adjust log 2021-06-18 11:15:15 -07:00
WarmUpTill
beec7d5939 Move getSceneItemsWithName() to utility 2021-06-18 11:15:15 -07:00
WarmUpTill
1bf2a154e2 Add macro condition "replay_buffer" 2021-06-18 11:15:03 -07:00
WarmUpTill
aa691cf51c Remove outdated comment 2021-06-18 11:15:03 -07:00
WarmUpTill
8fc12bee99 Initialize hotkeys to OBS_INVALID_HOTKEY_ID 2021-06-18 11:15:03 -07:00
WarmUpTill
5e8a0f92ee Add note regarding planned removal of tabs 2021-06-18 11:14:47 -07:00
WarmUpTill
86029e8e0e Add macro condition "Hotkey" 2021-06-15 13:44:33 -07:00
WarmUpTill
a86d6f1f76 Fix macro refs pointing to wrong entry when reordering 2021-06-15 06:16:04 -07:00
WarmUpTill
8ef798c70c Add macro condition "scene item order" 2021-06-15 06:15:37 -07:00
WarmUpTill
efc8726054 Add macro action "scene item order" 2021-06-15 06:15:37 -07:00
WarmUpTill
7b72abb100 Move populateSceneItemSelection() to utility 2021-06-15 06:15:37 -07:00
WarmUpTill
311ee5d0a0 Add macro condition "timer" (previously known as "interval") 2021-06-15 06:15:25 -07:00
WarmUpTill
5e4258968a Allow matching of empty files 2021-06-14 01:39:27 -07:00
WarmUpTill
ae4e861f7f
Add macro action "hotkey" (#226) 2021-06-14 01:21:23 +02:00
WarmUpTill
d692444687 Add / extend macro filter condition / action 2021-06-13 15:14:57 -07:00
WarmUpTill
6976c98fd8 Fix regex value not saving / loading 2021-06-13 15:14:57 -07:00
WarmUpTill
75f8d0cb07 Move filter / source functions to utility 2021-06-13 15:14:57 -07:00
WarmUpTill
a7e03245bd Add macro condition "Macro" (previously "Count")
The macro condition "Macro" contains the condition type previously named
"Count" and also add the options to check the condition state of other
macros.

This allows nesting of macro conditions.
For example the following can now be configured using this new option:

"If (scene 1 or scene 2 or scene 3 is active) for at least x amount of
time"
2021-06-13 10:25:48 -07:00
WarmUpTill
056e7ef737 Rename files 2021-06-13 10:25:48 -07:00
WarmUpTill
675c23d7cc Place extended sequence widget in scroll area
The previously fixed size only allowed extending the sequence depending
on the available screen space
2021-06-13 10:25:31 -07:00
WarmUpTill
c4b66ef7f6 Fix warnings 2021-06-13 10:25:31 -07:00
WarmUpTill
5cae1bca41 Add macro condition "virtual camera" 2021-06-13 10:25:20 -07:00
WarmUpTill
407d338b8b Add macro action "virtual camera" 2021-06-13 10:25:20 -07:00
WarmUpTill
edd9f18de0
Add scene trigger to control virtual camera (#162) 2021-06-13 19:25:02 +02:00
WarmUpTill
c9769a799d Abort macro if wait was aborted by manual scene change 2021-06-09 12:51:19 -07:00
WarmUpTill
047ca93486 Clean up 2021-06-06 19:05:55 +02:00
WarmUpTill
bd00a3f97e Remove preprocessing / todo 2021-06-04 08:31:28 -07:00
WarmUpTill
72f67705ed Collapse time restriction to clock symbol if no restriction is set 2021-06-03 10:19:19 -07:00
WarmUpTill
38161f63a3 Add helper getDataFilePath()
Used to get absolute file path to files in the plugin's data directory
2021-06-03 10:19:19 -07:00
WarmUpTill
b9f6e47a49 Add backwads compatability check to load() of DurationConstraint 2021-06-03 10:19:19 -07:00
WarmUpTill
326cc0c46f Add generic time constraint to macro conditions
Almost every macro condition can benefit from having the option to
specify a time constraint.
Instead of adding it to each condition separately add it to all
conditions with the option of excluding it when registering a new
condition type.
2021-06-03 10:19:19 -07:00
WarmUpTill
d9997d374d Add option to un-/pause macros using hotkeys 2021-05-30 11:05:44 -07:00
WarmUpTill
c18d799f4a Remove comment 2021-05-30 11:05:12 -07:00
WarmUpTill
fdb72629db Do not trigger resize if section is collapsed 2021-05-30 11:05:12 -07:00
WarmUpTill
7fda5e3820 Fix empty selection not showing correctly for visibility and filter 2021-05-30 11:05:12 -07:00
WarmUpTill
78966e456a Fix empty selection not showing correctly 2021-05-29 15:51:22 -07:00
WarmUpTill
49a042039e Add ability to set source settings to macro action "source" 2021-05-29 06:48:18 -07:00
WarmUpTill
adb266927f Move getSourceSettings() to utility 2021-05-29 06:48:18 -07:00
WarmUpTill
703f24b8fc Remove unused include 2021-05-29 06:48:18 -07:00
WarmUpTill
de6120c401 Save and load source settings 2021-05-29 06:48:18 -07:00
WarmUpTill
b1f7a255d5 Use same collapse threshold for actions and sources
Actions and conditions are no longer in fixed positions and instead
divided by a separator.
2021-05-29 06:47:16 -07:00
WarmUpTill
d112e92d33 Add scenes with filters to source selection for filter action 2021-05-29 06:47:16 -07:00
WarmUpTill
5c4dd6dae1 Set "select <xyz>" to disabled and sort selection alphabetically 2021-05-29 06:47:16 -07:00
WarmUpTill
546a83ee07 Add macro action "plugin-state" 2021-05-28 10:23:35 -07:00
WarmUpTill
09ab29b4ba Trigger resize of widget 2021-05-28 10:23:24 -07:00
WarmUpTill
86d4e59dc2 Adjust to section widget rework 2021-05-28 10:23:24 -07:00
WarmUpTill
aa7714210a Rework section widget to support dynamically sized content 2021-05-28 10:23:24 -07:00
WarmUpTill
2454ea8fa5 Add macro condition "source" 2021-05-28 10:23:24 -07:00
WarmUpTill
a5edbc8b88 Reset macro counters when stopping the plugin 2021-05-27 12:05:44 -07:00
WarmUpTill
ec6cffcd6a Rename MacroActionPause and add action to reset macro counter 2021-05-27 12:05:44 -07:00
WarmUpTill
89849a0792 Rename files 2021-05-27 12:05:44 -07:00
WarmUpTill
48e6bcbb7a Fix conditions and actions referencing macros not loading correctly
The reason is that while loading the required macro might not have been
loaded resulting in the pointer to the macro never being set correctly
in the loading phase.
2021-05-27 12:05:44 -07:00
WarmUpTill
6893d9539e Add MacroSelection widget 2021-05-27 12:05:44 -07:00
WarmUpTill
4a84bede37 Add macro condition "count" 2021-05-27 12:05:44 -07:00
WarmUpTill
77642c54d8 Add macro count member
Used to indicate the number of times the actions were executed.
2021-05-27 12:05:44 -07:00
WarmUpTill
e517fa7b39 Sort source selection alphabetically 2021-05-27 12:05:32 -07:00
WarmUpTill
9301713c49 Add option to not scene change msg via network tab 2021-05-25 10:18:36 -07:00
WarmUpTill
66285a0d3d Add option to synchronize preview scene via network tab 2021-05-25 10:18:36 -07:00
WarmUpTill
e83a9e8d94 Clean up
No need to pass switcher as parameter
2021-05-25 10:18:36 -07:00
WarmUpTill
881e197cb2 Fix visibility of scene items in groups not changing
Also allow groups to be selected as target for visibility action
2021-05-24 07:30:24 -07:00
WarmUpTill
e7f031641f Add warning for macro action source 2021-05-24 07:29:56 -07:00
WarmUpTill
198a5dc1ec Move AskBackup() 2021-05-24 07:29:56 -07:00
WarmUpTill
5496c256c0 Move functions not required in advanced-scene-switcher.hpp
Create header for platform specific functions.
Move some UI helper functions to utility.hpp.
2021-05-24 07:29:56 -07:00
WarmUpTill
a93cec2bb9 Fix typo 2021-05-24 07:29:56 -07:00
WarmUpTill
32101627a6 Remove unused settings value 2021-05-23 17:52:15 -07:00
WarmUpTill
c2d2a27d44 Use more const refs where applicable 2021-05-23 17:52:15 -07:00
WarmUpTill
5eb8378612 Run condition check for paused macros
Otherwise conditions might behave in unexpected ways when resuming.
For example, audio could immediately match after unpause, when it
matched before it was paused due to timers not being updated.
2021-05-23 12:15:04 -07:00
WarmUpTill
961ea655fd
Macro pause (#201)
* Add option to pause individual macros
* Add macro action to pause and unpause macros
2021-05-23 08:54:59 +02:00
WarmUpTill
c1704f2164 Fix rapid scene switches by random tab
Wait scene was not set while waiting for scene changes on the random
tab.
If wait scene was ever set by other means (sequence) the scene switcher
would immediately wake up as the wait scene is not the expected value.
2021-05-22 10:49:31 -07:00
WarmUpTill
e4b060976b Add macro action "media" 2021-05-22 10:48:52 -07:00
WarmUpTill
186198bfd4 Reduce macro logging in non-verbose mode 2021-05-22 12:14:56 +02:00
WarmUpTill
283025f1a8 Add helper function to convert to new id format 2021-05-22 03:07:09 -07:00
WarmUpTill
5b4ddfa669 Adjust logging to use new ids 2021-05-22 03:07:09 -07:00
WarmUpTill
572b974b82 Switch to using string as ids for actions and conditions
Using int is an id was getting messy with more and more conditions and
actions beeing added.
It also made the order of conditions and actions in the respective
comboboxes unchangable as there was a 1 to 1 relation of index and id.
2021-05-22 03:07:09 -07:00
WarmUpTill
72bd905e7c Improve logging for macros 2021-05-20 11:36:08 -07:00
WarmUpTill
51680adc20 Add macro condition "interval" 2021-05-19 11:47:32 -07:00
WarmUpTill
6a998934d0 Add macro action "source" 2021-05-18 11:12:22 -07:00
WarmUpTill
b80c16a446 Add macro action filter 2021-05-17 13:16:13 -07:00
WarmUpTill
f4d11dd6e6 Add filter helper functions 2021-05-17 13:16:13 -07:00
WarmUpTill
4248b86705 Add macro action to control scene item visibility 2021-05-17 12:20:54 -07:00
WarmUpTill
305ce96ad0 Adjust includes to new file name 2021-05-17 12:20:54 -07:00
WarmUpTill
74dfd9af30 Rename 2021-05-17 12:20:54 -07:00
WarmUpTill
2a73583793 Fix fullscreen and implement maximized checks 2021-05-17 11:08:26 -07:00
WarmUpTill
8f16d05a28 Fix potential crash in audio macro action
UpdateEntryData() could be called from ActionChanged() leading to a
potential double lock of switcher->m when triggerin other slots of this
widget
2021-05-16 13:00:06 -07:00
WarmUpTill
2ce0b35921 Add volume to control to audio action 2021-05-15 09:51:20 -07:00
WarmUpTill
33d2def126 Explicitly cast enum class to int 2021-05-15 09:05:43 -07:00
WarmUpTill
c44b0a2ac2 Remove unused verbose parameter 2021-05-15 09:05:43 -07:00
WarmUpTill
3abeb936b3 Fix random order of various macro entries 2021-05-15 01:03:07 -07:00
WarmUpTill
cef513f775 Adjust plugin state macro condition id 2021-05-14 14:03:04 -07:00
WarmUpTill
a66961eac1 Add macro condition "idle" 2021-05-14 14:03:04 -07:00
WarmUpTill
92c8767e1a Move plugin state condition to end 2021-05-14 09:44:49 -07:00
WarmUpTill
5b12468a46 Add macro condition process 2021-05-14 09:44:49 -07:00
WarmUpTill
675021c284
Add Macro tab (#170)
* add action switch scene

* add window condition

* Add macro action wait

* Add macro condition region

* Add audio macro condition

* Add file based macro condition

* Add macro condition media

* Add video macro condition

* Add macro action audio

* Add macro action streaming

* Add macro action recording

* Add replay buffer macro action

* Add stream macro condition

* Add macro condition recording

* Add macro condition plugin state

* Add macro action to run an arbitrary command
2021-05-14 16:37:01 +02:00
WarmUpTill
6bf122d0e8
Add support for transition duration in switchScene() (#178) 2021-05-12 19:50:50 +02:00
WarmUpTill
717d41a527 Adjust default setting values of transition tab 2021-05-04 11:32:45 -07:00
WarmUpTill
ad5587e084 Fix transition overrides not restoring duration 2021-05-04 11:32:45 -07:00
WarmUpTill
f37f384b5a Move DisplayMessage() to utility.hpp 2021-05-04 11:32:45 -07:00
WarmUpTill
dad36689c4 Move AdvSSScreenshotObj to separate files 2021-05-04 11:32:45 -07:00
WarmUpTill
0bd7d004ad Reduce includes of platform specific files
This is done to avoid build issues in future.
For example previously the class "Duration" class caused build issues on
the MacOS platform due to a name conflict.
2021-05-04 11:32:45 -07:00
WarmUpTill
f8c589c7a2 Only send scene switch msg if scene was switched
This change is to avoid spamming the connected clients with scene change
messages which might not even do anything as the scene change already
took place.
Additionally it allows scene switch messages to be sent by just calling
the switchScene() function.
2021-05-04 11:32:45 -07:00
WarmUpTill
e714df7ad0 Use Duration class and DurationSelection widget 2021-05-04 11:32:45 -07:00
WarmUpTill
6277da1bbd Add Duration class and DurationSelection widget 2021-05-04 11:32:45 -07:00
WarmUpTill
1bef309264 Only try to change transition overrides if needed 2021-05-04 11:32:45 -07:00
WarmUpTill
2e1d660e17 Clean up loading of transition tab settings 2021-05-04 11:32:45 -07:00
WarmUpTill
3f492f468a Move compareIgnoringLineEnding() to utility.hpp 2021-05-04 11:32:45 -07:00
WarmUpTill
c86bba84b3 Add scene-group.hpp include to switch-generic
This is to allow easier use of generic scene switch structs and widgets
in other areas. (Macro tab)
2021-05-04 11:32:45 -07:00
WarmUpTill
c468b0698b Move definition of SwitchTargetType 2021-05-04 11:32:45 -07:00
WarmUpTill
2af82fe22a Fix ignoring match of checkSwitchInfoFromFile() if checkFileContent() does not match 2021-05-04 11:32:45 -07:00
WarmUpTill
5d720219bf Clean up transition tab save and load 2021-05-04 11:32:45 -07:00
WarmUpTill
484e1aa191 Remove unnused function 2021-05-04 11:32:45 -07:00