Commit Graph

658 Commits

Author SHA1 Message Date
WarmUpTill
b6b0531dbc Fix size ofi new collapsed segments containing ResizingPlainTextEdit 2022-02-26 16:08:55 -08:00
WarmUpTill
2de0a94756 Fix highlight animations never stopping 2022-02-26 16:08:55 -08:00
WarmUpTill
d018740442 Fix potential deadlock in ShowMatchDialog 2022-02-26 16:08:55 -08:00
WarmUpTill
d89f8a7972 Clear pixmap if screenshot creation failed 2022-02-26 16:08:55 -08:00
WarmUpTill
f7a2aa09cb Fix potential crash 2022-02-26 16:08:55 -08:00
WarmUpTill
04825e4b88 Fix warning 2022-02-26 08:23:10 -08:00
WarmUpTill
1cfd981245 Reduce text edit areas size of file, filter, source, transform segments 2022-02-26 08:23:10 -08:00
WarmUpTill
6fb8297275 Use QPropertyAnimation::DeleteWhenStopped PulseWidget() when once is set
Also fixes potential crash when waiting for single shot timer when
looping and widget and animations are deleted in the meantime
2022-02-26 08:23:10 -08:00
WarmUpTill
4253c99cf2 Fade out segment controls which will likely not be needed
This was done to give some hints which controls will likely need to be
used to avoid mistakenly clicking on the action controls when editing
conditions.
2022-02-26 08:23:10 -08:00
WarmUpTill
ae13a68cae Double click on list item in run and sequence action to edit 2022-02-26 08:23:10 -08:00
WarmUpTill
4e5aae7e5f
Add 'OBS stats' condition type (#414)
It supports various different types of stats:
* fps
* cpu
* ram
* frame time
* skipped frames
* missed frames
* dropped frames
* data size sent
* bitrate
2022-02-26 11:37:54 +01:00
WarmUpTill
88dff37776 Allow drag and drop reordering of macros 2022-02-24 14:15:23 -08:00
WarmUpTill
83df1ab658 Skip collapse animation if section is already in the desired state 2022-02-24 14:15:23 -08:00
WarmUpTill
5298b14803 Use name of macro to be copied in addNewMacro() dialog 2022-02-24 14:15:23 -08:00
WarmUpTill
eeedf11c6a Add hotkey to delete macro segments 2022-02-24 14:15:23 -08:00
WarmUpTill
89efb6d1c8 Allow selecting either an action or condition but not both 2022-02-24 14:15:23 -08:00
WarmUpTill
1054bce4a7 Remove slight movement of macro segment when (de-)selecting them 2022-02-24 14:15:23 -08:00
WarmUpTill
d3cbddf0a4 Allow selecting scene groups in preview scene change action 2022-02-24 14:15:05 -08:00
WarmUpTill
a91fed1583 Simplify waitForTransitionChange()
Will now also work if the target scene is the already currently active
scene.
2022-02-24 14:15:05 -08:00
WarmUpTill
c94a791d19 Allow switching to already active scene if in studio mode
Preview and program scene can differ in regards to the active scene
items.
Thus it can make sense to switch to the already active scene.
2022-02-24 14:15:05 -08:00
WarmUpTill
02e380a9f2 Allow selecting current and previous scene in preview scene action 2022-02-24 14:15:05 -08:00
WarmUpTill
cc9d5897da Add deprecation warning for legacy tabs 2022-02-20 04:50:12 -08:00
WarmUpTill
8e3eb8519b Fix potential crashes when adding or removing macro segments
I wrongly assumed that std::deque would guarantee that pointers to
elements in deque would not be invalidated by insert() or erase() but
this is not the case it seems.

""
An erase in the middle of the deque invalidates all the iterators and
references to elements of the deque. An erase at either end of the deque
invalidates only the iterators and the references to the erased
elements.
""

I guess I got lucky noone ran into these sorts of crashes for now?
2022-02-20 04:50:12 -08:00
WarmUpTill
354ef56070 Do not select any item if pressing add without any active selection 2022-02-20 04:50:12 -08:00
WarmUpTill
352dac5e32 Add MacroSegmentList to allow deselecting items
Previously once a macro segement was selected you could only deselect it
by clicking on different macro segment, thus never allowing the user to
deselect all macro segments
2022-02-20 04:50:12 -08:00
WarmUpTill
584fe4b3b6 Copy logic type when adding conditions 2022-02-20 04:50:12 -08:00
WarmUpTill
bdd489aea5 Fix crashes related to PulseWidget()
* Fix crash if widget was deleted during animation
* Fix crash if multiple animations were started at the same time
2022-02-20 04:50:12 -08:00
WarmUpTill
0b2e725471 Do not run collapse animation when calling SetContent() 2022-02-20 04:50:12 -08:00
WarmUpTill
45e8378021 Remove old macro segment controls 2022-02-20 04:50:12 -08:00
WarmUpTill
955f308c59 Add list-like controls to macro actions and conditions 2022-02-20 04:50:12 -08:00
WarmUpTill
2c25bb4dd4 Make slider background transparent
Sliders, e.g. in the video condition, would otherwise block parts of the
highlight frame around macro segments.
2022-02-18 13:40:33 -08:00
WarmUpTill
d8dcd91ed9 Split video condition into multiple files 2022-02-18 13:40:33 -08:00
WarmUpTill
03900e936b Rename class AdvSSScreenshotObj to ScreenshotHelper 2022-02-18 13:40:33 -08:00
WarmUpTill
6d2360eb87 Clean up AdvSSScreenshotObj usage in video condition 2022-02-18 13:40:33 -08:00
WarmUpTill
ab4a70a758 Refresh contents of "Show match" dialog every second 2022-02-18 13:40:33 -08:00
WarmUpTill
b48276bd5c Add option to check for OBS shutdown to MacroConditionPluginState 2022-02-18 13:35:15 -08:00
WarmUpTill
34167366db Add day of week based check to date condition 2022-02-12 17:57:35 -08:00
WarmUpTill
bfa8f4d9d5 Visually clean up date condition
- add "and" separator if "between" check is chosen
- split dateTimeEdit into a dateEdit and a timeEdit to make editing
  easier
- move ignore* checkboxes in front of respective edit widgets to make
  their intention more clear and add tooltips to further clarify their
  use
2022-02-12 17:57:35 -08:00
WarmUpTill
1328896801 Reopen last opened tab in current session
Will reset to General tab on startup / scene collection change
2022-02-10 11:29:44 -08:00
WarmUpTill
0effbd8ace Add context menu entry for expanding and collapsing edit areas 2022-02-04 11:38:42 -08:00
WarmUpTill
08a8157f3a Reduce spacing between macro segments 2022-02-04 11:38:42 -08:00
WarmUpTill
262bb3f1ee Keep size of individual macro sgements consistent
Previously the segments would expand if there was still room in the
condition and action area.
2022-02-04 11:38:42 -08:00
WarmUpTill
0771f939a6 Restore original color after PulseWidget() completes 2022-02-04 11:38:42 -08:00
WarmUpTill
a81ee605d6 Rename function 2022-02-04 11:38:42 -08:00
WarmUpTill
1e7726bcfc Add option to highlight recently executed macros on the Macro tab 2022-02-04 11:38:42 -08:00
WarmUpTill
dc698e426d Add MacroListEntryWidget
To be used for macro tab's macro list as regular QListWidgetItem are too
limited
2022-02-04 11:38:42 -08:00
WarmUpTill
a4f66dbbcd Fix warnings 2022-02-04 11:38:42 -08:00
WarmUpTill
1516b9a939 Add option to hide legacy tabs 2022-02-04 11:38:42 -08:00
WarmUpTill
e13f20c860 Adding frame highlighting individual macro segments 2022-02-04 11:38:42 -08:00
WarmUpTill
727992f1d0 Clean up stylesheet usage 2022-02-04 11:38:42 -08:00
WarmUpTill
4e75a15118 Clean up unnecessary variable 2022-02-04 11:38:42 -08:00
WarmUpTill
48368f4bd6 Move vertical / horizontal control handling to macro segment 2022-02-04 11:38:42 -08:00
WarmUpTill
61d9031933 Add option to toggle between vertical and horizontal macro controls 2022-02-04 11:38:42 -08:00
WarmUpTill
487c735e13 Delay show and hide of macro controls 2022-02-04 11:38:42 -08:00
WarmUpTill
7a34c334bd Highlight macro segments new position when moving it up or down 2022-02-04 11:38:42 -08:00
WarmUpTill
4988683e22 Resize conditions and actions areas on expand / collapse all 2022-02-04 11:38:42 -08:00
WarmUpTill
cb681643c8 Fix scene switch action blocking unexpectedly
If "wait for transition" was checked and no valid scene was selected the
waitForTransitionChange() function will wait for its maximum allowed
duration as switcher->currentScene will never be null.
2022-02-02 09:55:35 -08:00
WarmUpTill
af188b55df
Move plugins to separate folder (#400) 2022-01-29 15:47:16 +01:00
WarmUpTill
f287a1041d Add option to also check for configured volume level 2022-01-25 12:46:16 -08:00
WarmUpTill
fda9b1c3ea Fix dock location and size not saving correctly
OBS will handle the docking position / window size and position as long
as an object name is set
2022-01-25 10:33:41 -08:00
WarmUpTill
abd6fd6b7e
Add sequence action (#395) 2022-01-22 18:07:26 +01:00
WarmUpTill
2909b1300e Fix empty statusControl of general tab blocking mouse input 2022-01-22 06:14:03 -08:00
WarmUpTill
d1331a60b9 Fix crash on exit caused by status dock 2022-01-22 06:14:03 -08:00
WarmUpTill
d5fc3befb8 Remove QtConcurrent dependency 2022-01-22 06:14:03 -08:00
WarmUpTill
e4bd1fc180 Reduce amount of signals emitted on repopulate 2022-01-22 06:14:03 -08:00
WarmUpTill
59c87ca027 Emphasize that a duration of 0s means using default duration 2022-01-21 09:51:00 -08:00
WarmUpTill
eda161de39 Sort condition and action selection alphabetically 2022-01-21 09:51:00 -08:00
WarmUpTill
caea16c6ad Hide selected macro for run or stop action
Running a macro from within itself is not supported and stopping it from
withint itself does not seem useful either.
2022-01-21 09:51:00 -08:00
WarmUpTill
e3a39a5df7 Add label clarifying the condition's intent 2022-01-21 09:51:00 -08:00
WarmUpTill
38b7e08711 Add macro action to stop other macros 2022-01-21 09:51:00 -08:00
WarmUpTill
7349841758 Fix unexpectedly returning true for hotkey condition
The condition would return true after unpause, if a configured hotkey was pressed
during the time the macro was paused.
2022-01-21 09:50:19 -08:00
WarmUpTill
5d58269b02 Add function to access parent macro from condition or action 2022-01-21 09:50:19 -08:00
WarmUpTill
82503286ea Use the same widget for main settings window and status dock 2022-01-14 09:11:36 -08:00
WarmUpTill
16ee789c82 Add option to perform macro actions only on condition change 2022-01-06 08:41:18 -08:00
WarmUpTill
d040a01016 Reintroduce checkbox to change current scene check transition behaviour 2022-01-06 08:41:18 -08:00
WarmUpTill
eb952afe58 Enable time constraints for transition condition 2022-01-06 08:41:18 -08:00
WarmUpTill
016d963598 Fix volume not changing when selecting fade with a duration of 0s 2022-01-04 19:32:53 -08:00
WarmUpTill
d31ae77176 Run macros even if they are paused when pressing "Run Macro" 2022-01-04 19:32:53 -08:00
WarmUpTill
2c1b97e5cd Abort macro early if it was paused 2022-01-05 03:39:37 +01:00
WarmUpTill
2d61189655 Display message on first boot 2022-01-04 17:16:38 -08:00
WarmUpTill
82c20b871b Don't ask to backup settings if there is nothing to backup 2022-01-04 17:16:38 -08:00
WarmUpTill
bd52ef8e84 Don't abort build if OpenVR cannot be found 2022-01-04 15:50:26 -08:00
WarmUpTill
59e1ddd31e Add openvr condition 2022-01-04 15:50:26 -08:00
WarmUpTill
a320d78a08 Separate OpenCV dependency into its own lib
This should avoid issues of the whole plugin not loading if OpenCV is
not available.
This approach should also work for possible future external
dependencies.
2022-01-03 18:22:02 -08:00
WarmUpTill
ce5730428c Remove unnecessary uses of UNUSED_PARAMETER macro 2022-01-03 13:48:21 -08:00
WarmUpTill
f7b9795014 Add option to check if source is muted 2022-01-03 13:48:21 -08:00
WarmUpTill
3417fc5407 Add status dock 2022-01-03 11:32:22 -08:00
WarmUpTill
2649efe8b3 Adjust to SceneItemSelection and SceneItemSelectionWidget 2022-01-03 08:52:32 -08:00
WarmUpTill
3af5897427 Rename function 2022-01-03 08:52:32 -08:00
WarmUpTill
92877a6b30 Add SceneItemSelection and SceneItemSelectionWidget
Allows selecting individual scene items if there are duplicate entries
for the same source.
2022-01-03 08:52:32 -08:00
WarmUpTill
fbdaffcbf6 Clean up formatJsonString() 2022-01-03 08:52:32 -08:00
WarmUpTill
ba111c6caa Add action to import settings from file 2022-01-01 18:26:40 -08:00
WarmUpTill
5c8760ac0a Add action to switch scene collection 2022-01-01 18:26:40 -08:00
WarmUpTill
e0cca2a0d4 Add action to switch profile 2022-01-01 18:26:40 -08:00
WarmUpTill
d69aba8ab7 Remove dependency to SceneSwitcherEntry and SwitchWidget 2021-12-28 05:07:37 -08:00
WarmUpTill
a2ba7adc56 Add option to wait for transition to complete 2021-12-28 05:07:37 -08:00
WarmUpTill
0881146a25 Fix startup behavior not loading correctly 2021-12-22 13:12:41 -08:00
WarmUpTill
5224d6589e Reduce log output when running macro in background 2021-12-22 13:12:27 -08:00
WarmUpTill
15eeec8ebf Add condition "Studio Mode"
Can be used to check whether or not studio mode is active or to check
the current preview scene
2021-12-22 13:12:27 -08:00
WarmUpTill
ed7f375d64 Fix crash when reordering macros 2021-12-22 13:12:27 -08:00
WarmUpTill
8d83df9034 Add warning if macro functionality is not running with highest priority 2021-12-06 10:27:20 -08:00
WarmUpTill
0029977ae1 Adjust and move default priorities
New users will be confused if their macros are not executed,
if they are "blocked" by other scene switching methods.
2021-12-06 10:27:20 -08:00
WarmUpTill
70b3c2e240 Workaround OpenCV MacOS build issue 2021-12-04 08:32:52 -08:00
WarmUpTill
1785035b96 Fix warnings 2021-12-04 08:32:52 -08:00
WarmUpTill
69ab101ba3 Fix header info for media and transition condition 2021-12-04 08:32:52 -08:00
WarmUpTill
d1e752cda1 Remove Linux workaround 2021-12-04 08:32:37 -08:00
WarmUpTill
845506f7e4 Allow running macros in parallel to other macros 2021-12-04 04:09:30 -08:00
WarmUpTill
9dd47b811b Add button to manually run macro actions 2021-12-04 04:09:30 -08:00
WarmUpTill
eafad7fe7f Add option to match any or all media sources of a specific scene 2021-12-04 04:04:55 -08:00
WarmUpTill
f36062859d Allow setting random duration in specified range 2021-12-04 03:37:46 -08:00
WarmUpTill
949e26781a Enable screenshots of scenes 2021-12-04 03:37:08 -08:00
WarmUpTill
bb954a2e9a Add macro action for triggering screenshots 2021-12-04 03:37:08 -08:00
WarmUpTill
631423a251 Add condition to check if the plugin is running
This will only ever return true as the plugin cannot perform checks if
it is not running.
This is intended to be used in cases where it can be useful to trigger
actions once the plugin was stopped and restarted or if one wants to
perform actions after a certain amount of plugin "uptime".
2021-12-01 11:38:38 -08:00
WarmUpTill
c527f15744 Add hotkey to toggle pause state of macros 2021-12-01 09:23:04 -08:00
WarmUpTill
8fdacc3ef7 Suggest file name when saving settings 2021-11-28 09:57:30 -08:00
WarmUpTill
02918785ba Hide waitForTransition option if waiting for transition
The additions to the transition condition to check for target and source
scene of a ongoing transition fullfill the same role and this option
does not really fit the current scene check anyways.
2021-11-28 09:56:50 -08:00
WarmUpTill
2d9e6bcaa2 Add transition option to check for transition source and target scene 2021-11-28 09:56:50 -08:00
WarmUpTill
f2570e1deb Add the option to execute another macro's actions 2021-11-28 09:56:37 -08:00
WarmUpTill
f9afbcbc59 Add macro action to display system tray notifications 2021-11-28 09:56:17 -08:00
WarmUpTill
51b4ef326d Add fallback using QDesktopServices::openUrl() for "run" action
Users not familiar with launching processes with arguments might expect
the run action to behave like clicking on icons on the desktop and be
frustrated if the "file is not being opened".
Thus introducing this fallback might help some users out.
2021-11-23 11:11:41 -08:00
WarmUpTill
ad08df3d2f Clean up adding new macros to Random action 2021-11-23 11:11:41 -08:00
WarmUpTill
4d32e921f9 Resize list to minimum necessary height 2021-11-23 11:11:41 -08:00
WarmUpTill
d7102d395e Ensure contents of comboboxes are readable when changing scene/filter 2021-11-20 03:52:54 -08:00
WarmUpTill
82a41694a1 Allow interacting with OBS main window while plugin settings are opened 2021-11-20 03:52:54 -08:00
WarmUpTill
a1cae263c1
Add macro action "random" (#353)
This should be expanded upon by adding the ability to add weights to each macro.
2021-11-20 12:52:12 +01:00
WarmUpTill
cce6e240c2 Add option to fade in/out volume change 2021-11-17 12:30:10 -08:00
WarmUpTill
9d04b4d1a0 Move setLayoutVisible() to utility 2021-11-17 12:30:10 -08:00
WarmUpTill
fd7e48eff9 Add scene-visibility macro condition 2021-11-17 12:29:57 -08:00
WarmUpTill
0350a46004 Allow use of "previous scene" 2021-11-17 12:29:57 -08:00
WarmUpTill
00fec4b573 Fix macro hotkeys not working 2021-11-17 12:29:41 -08:00
WarmUpTill
c40a3af8ca Fix add, delete, reorder not working when changing macro segment type 2021-11-17 12:06:53 -08:00
WarmUpTill
e452d8cc8c Allow selecting source type for scene visibility action
This should allow to simplify some setups which required showing /
hiding all sources of a particular type.
2021-11-12 10:05:54 -08:00
WarmUpTill
fbc9818764 Fix macro count not updating correctly
The underlying issue are the potential deadlocks when triggering
frontent function calls while saving / loading is triggered in parallel
like it can happen when switching scene collections.

Hopefully the new frontend events allow for a cleaner solution.
2021-11-12 10:05:11 -08:00
WarmUpTill
5ef09f661f Show warning if macro is paused
And clean up timer handling for this condition type
2021-11-12 10:05:11 -08:00
WarmUpTill
2155a942f3 Do not check conditions of paused macros 2021-11-12 10:05:11 -08:00
WarmUpTill
f955c07bda Fix warnings 2021-11-01 11:23:43 -07:00
WarmUpTill
95537f39e4
Switch to using process names for process condition and executable tab (#337)
Previously the process condition and executable tab were just reusing
the window title functionality.
2021-10-31 14:05:54 +01:00
WarmUpTill
0490c97ad9 Add option to use pattern matching for "output changed" condition
This will allow you to ignore minor changes in the video output, for
example in noisy video streams.
2021-10-31 06:05:16 -07:00
WarmUpTill
4b17314c66 Add conditions "stream starting" and "stream stopping" 2021-10-31 05:40:28 -07:00
WarmUpTill
7459793fe3 Improve missing data dir error 2021-10-30 11:40:34 -07:00
WarmUpTill
8a39a859be Remove whitespace 2021-10-30 11:40:26 -07:00
WarmUpTill
f824ac8f4e Add option to display plugin running state in system tray 2021-10-30 11:40:10 -07:00
WarmUpTill
9bc59c1082 Add option to not save remaining time 2021-10-25 11:19:53 -07:00
WarmUpTill
8b9f03a349 Add timer action
This action can be used to control the state of the timers on macro
conditions
2021-10-23 13:54:26 -07:00
WarmUpTill
093b0f9ec0 Add pause / continue and save / load remaining time for time condition 2021-10-23 13:54:26 -07:00
WarmUpTill
254eabfa8d Fix exact image match not wokring when using images with alpha channel
The screenshots taken from video sources were using the image format
Format_RGBX8888 instead of Format_RGBA8888.
The alpha channel of screenshots taken from OBS would be blended with a
black background while this step would be not performed for files loaded
to macht match the video sources.
2021-10-23 13:54:15 -07:00
WarmUpTill
b2da8faf37 Improve performance by not creating pattern data each interval 2021-10-23 13:54:15 -07:00
WarmUpTill
3eba20e2d8 Add option to use alpha channel as mask for pattern match 2021-10-23 13:54:15 -07:00
WarmUpTill
08841aa88e Use duration control class / widget for scene triggers 2021-10-23 13:53:56 -07:00
WarmUpTill
2e96c226b5 Improve performance of expand / collapse all 2021-10-23 13:53:56 -07:00