Commit Graph

25 Commits (master)

Author SHA1 Message Date
jpark37 f2b049c0e7 UI: Add support for nonlinear SRGB blending 2022-04-02 16:02:41 -07:00
jp9000 61cbfb3b9a UI: Use get_new_source_name instead of strprintf
Remove a bit of duplicated code, and fix non-Windows compilation. This
is a bit of a workaround to not have to modify cmake, but might as well
reuse a function that already exists anyway rather than duplicate the
code.
2022-03-08 01:27:20 -08:00
jp9000 213712dfe5 UI: Fix Copy/Paste not including blend mode 2021-12-28 09:12:51 -08:00
jp9000 2364dfd0ef UI: Remove unnecessary shared_ptr allocations
Not sure why these were separate allocations -- the data will be
preserved just fine when copying the structure without being separate
allocations
2021-12-28 08:34:40 -08:00
gxalpha d121c92fbb UI: Add undo/redo for "Add existing source"
Adds an undo/redo action for the "Add existing source", which previously
was missing.
2021-12-17 04:30:36 -08:00
VodBox 3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
tt2468 544633d9bb UI: Remove unnecessary calls to `RefreshSources()`
With the previous commit, these calls to `RefreshSources()` are no
longer necessary.
2021-11-20 19:58:38 -08:00
Anthony Torres fd500f15a3 UI: Apply transforms/crops correctly to sources on paste
Applies transformations correctly to copy/pasted sources when copy and
pasting multiple. Previously the transformation/crop state was stored in
a single variable on copy so it would only apply the transformations to
one of the selected sources on paste instead of what the state was when
copied.
2021-11-10 14:22:45 -08:00
jp9000 da04907927 Revert "UI: Disable hotkeys when a user is expected to type text"
This reverts commit f832d14220.

Reverting this until we do more investigation. Currently, any text
that can be typed in a dialog requires the dialog to re-enable hotkeys
on destruction, which is frustrating. There has to be a better way.
2021-10-03 07:52:44 -07:00
Ryan Foster f832d14220 UI: Disable hotkeys when a user is expected to type text
Disable hotkeys when a user starts an interaction with the UI where they
are expected to type text and re-enable hotkeys when the interaction is
completed.
2021-09-04 15:22:21 -07:00
gxalpha 981e7f7079 UI: Fix redo recreating sources in the wrong scene
Fixes an issue where if creating a new source was re-done from a
different scene, the source would be created first in that scene and
then OBS would switch to the scene where the source originally was
created.
Changes the order of these two operations, which makes OBS create the
source in the correct scene.
2021-08-18 11:16:14 -07:00
jp9000 78f1983f7d UI: Remove unnecessary Undo/Redo cleanup func
Since fixing the reference holding issue with scene/source deletion, the
undo/redo cleanup function (last param of add_action) is no longer
required.
2021-04-27 20:45:43 -07:00
Clayton Groeneveld 7dfd36f9e8 UI: Force current scene when using undo/redo
The undo/redo functions are setting the current scene. Everytime
it would do this, it would actually transition to the scene.
This forces the current scene, so it fixes a bug where the
transition would be grayed out when undoing/redoing.
2021-04-10 01:49:30 -07:00
Ford Smith 60d95cb5bd UI/libobs: Undo/Redo Sources and Scenes
Implements the Undo/Redo for scenes and sources, ranging from renaming,
deletion, addition. It also adds several elements to libobs that were
designed to facilitate undo/redo, and should not affect the rest of
libobs.
2021-03-29 03:06:26 -04:00
jp9000 b2302902a3 libobs: Fix source type versioning system
(This also modifies image-source, obs-text, text-freetype2, and UI)

This improves source definition versioning.  To do this, it now stores
two identifier names.  One "unversioned" which is the original name, and
one "versioned" with the version number appended.

This fixes both backward compatibility with older OBS versions, and
fixes the inability to use "add existing" in OBS itself on sources
created from older version definitions.
2020-03-09 06:12:22 -07:00
jp9000 aee84cc743 libobs: Add "monitoring by default" source cap
(This also modifies the UI module)

Adds the ability for a source to monitor by default.  This is mainly
aimed at browser sources, so that they do not stop outputting audio by
default like they used to.
2019-07-26 00:05:14 -07:00
jp9000 f53df7da64 clang-format: Apply formatting
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.
2019-06-23 23:49:10 -07:00
Richard Stanway 90df9ea290 UI: Update error message severity levels and show additional info 2019-04-19 05:45:19 -07:00
Clayton Groeneveld c1eefdca68 UI: Remove help icon from source select dialog
Fixes https://obsproject.com/mantis/view.php?id=1394
2019-03-28 03:55:25 -05:00
jp9000 5993834815 libobs: Change groups to actual public types
(This commit also modifies UI)

Changes groups to their own independent type, "group".  This allows them
to be used like other regular types, and allows the ability to reference
groups in multiple scenes.  Before, a group would always be linked to
the scene it was in.  This made it cumbersome for users to modify groups
if they had a similar group in multiple scenes (they would have to
modify each group in each scene).  Making groups like other source types
makes more sense to solve this issue so they can be referenced in
multiple scenes at once.  This also removes a significant amount of
group-specific handling code required for implementing groups in the
front-end.

One limitation however: due to the way sub-items of groups are
seamlessly modifiable and sortable as part of the whole scene, the user
cannot have multiple references to the same group within one scene.
2018-07-16 19:01:51 -07:00
jp9000 8f43934be6 UI: Lock graphics context when adding new sources
Prevents a potential cross-lock deadlock.  The UI thread would lock the
scene's mutex in obs_scene_atomic_update, then the item would lock the
graphics context to create a texture.  Meanwhile in the video thread, it
could lock the graphics context in the render loop, then lock the
scene's mutex when rendering.  When doing anything graphics-related, the
graphics context is always supposed to be locked before the scene's
mutex is supposed to be locked (it's designed that way), and the
obs_scene_atomic_update would just bypass that.
2017-09-17 02:47:54 -07:00
jp9000 522f5cdf3b UI: Make sure all message box buttons are translated
Instead of QMessageBox::question and QMessageBox::information, use the
OBSMessageBox class, which translates all buttons.
2017-05-13 14:06:32 -07:00
cg2121 bcd491a3d6 UI: Add copying/pasting of sources/filters
Closes jp9000/obs-studio#860
2017-03-25 04:29:49 -07:00
jp9000 133fa04db3 UI: If scene/source names exist, start from 2
Currently if you have a scene, "Scene" for example, and you create a new
scene, the dialog will pop up with a default name, but it'll start with
"Scene 1" instead of "Scene 2".  Same thing occurs with sources.  This
fixes that to start from 2 instead.
2017-02-26 08:23:31 -08:00
jp9000 01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00