-If the user were in the middle of a transition and clicked
the cut transition, the transitions would become borked.
-This actually disables the transition widgets, so the
user doesn't click them. Before, the disabling of the
widgets didn't work as expected. The code for enabling/disabling
them was also simplified.
-This loading of studio mode was moved in OBSInit because
the loading of transitions needs to happen first. This fixes
a bug when enabling/disabling the t-bar when the program
is first loaded. The t-bar would be disabled even if a
cut or stinger transition was not used.
-When the user would click the quick transitions, the
t-bar would be enabled even when it was not supposed
to.
It's a waste of GPU time to do two fullscreen passes to render final mix
previews. Use blend states to simulate the black background of
DrawBackdrop() for the following situations:
- Main preview window (Studio Mode off)
- Studio Mode: Program
This does not effect:
- Studio Mode: Preview (still uses DrawBackdrop)
- Fullscreen Projector (uses GPU clear to black)
- Windowed Projector (uses GPU clear to black)
intel GPA, SetStablePowerState, Intel HD Graphics 530, 1920x1080
Before:
DrawBackdrop: ~529 us
main texture: ~367 us (Cheaper than drawing a black quad?)
After:
[DrawBackdrop optimized away]
main texture: ~383 us
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
Add D3D/GL debug markers to make RenderDoc captures easier to tranverse.
Also add obs_source_get_name_no_null() to avoid boilerplate for safe
string formatting.
Closesobsproject/obs-studio#1799
Contrary to what the name would have you believe, QPointer<> is not used
to delete a pointer when it leaves its specific scope. Instead, it's
used to check to see if the pointer is still valid. For most
QWidget-based objects, this is actually fine because QWidgets that are
assigned to layouts or other widgets will automatically be destroyed --
however, for non-widget objects, this can cause a memory leak.
This patch replaces QPointer with QScopedPointer where applicable to
prevent memory leaks.
Closesobsproject/obs-studio#1367
OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED is supposed to be called
whenever the user changes the current preview scene -- it was almost
never being triggered.
(Note: This commit also modifies UI and test)
This makes it so that main preview panes are rendered with the main
output texture rather than re-rendering the main view. The view will
render all objects again, whereas the output texture will be a single
texture render of the same exact thing.
Also fixes some abnormal artifacting when scaling the main preview pane.
The studio mode double-click scene switching option disables scene
duplication, which bypasses the user's settings for scene switching in
studio mode. This fixes it so that scenes are properly duplicated
according to the user's settings.
The scene override would trigger, but the scene override variable would
stay set, causing the next transition to be the same one that was
previously used for overriding.
Allows the ability to override what specific transition a scene may use
when transitioning to it.
(Original proposal by cg2121, reworked by Jim)
Closesjp9000/obs-studio#1052
This adds the ability to switch to a scene by double-clicking it when in
studio mode.
(Edit by Jim: In case this change is undesired by the user, this has
been changed to be an option in general settings; disabled by default)
Closesjp9000/obs-studio#1029
Fixes a bug where the individual drop-down lists of each quick
transition would not have the correct available transitions listed if
transitions were added, renamed, or removed
With these new functions, plugin developers can enable, disable and
get the status of Studio Mode, as well as get and set the current
preview scene and transition the current preview to Program
Here is a list of the Studio Mode events:
- Studio Mode enabled
- Studio Mode disabled
- Previewed scene in Studio Mode changed
This allows using the functions via Qt message queue. The reason for
this is so a frontend API can queue these functions to call safely from
another thread.