Skip to content

Commit e1b65f9

Browse files
authored
Merge pull request #4223 from OpenShot/audio-effects
Audio effects
2 parents 1e639d8 + fc472d9 commit e1b65f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+673
-531
lines changed

src/effects/icons/bars.png

260 Bytes

src/effects/icons/[email protected]

41.3 KB

src/effects/icons/blur.png

2.83 KB

src/effects/icons/[email protected]

87.2 KB

src/effects/icons/brightness.png

1.96 KB

src/effects/icons/[email protected]

77.9 KB

src/effects/icons/caption.png

6.43 KB

src/effects/icons/[email protected]

78.8 KB

src/effects/icons/chromakey.png

2.66 KB

src/effects/icons/[email protected]

88.4 KB

src/effects/icons/colorshift.png

2.82 KB

src/effects/icons/[email protected]

86.3 KB

src/effects/icons/compressor.png

22.7 KB

src/effects/icons/[email protected]

80 KB

src/effects/icons/crop.png

5.54 KB

src/effects/icons/[email protected]

68.8 KB

src/effects/icons/deinterlace.png

2.3 KB

src/effects/icons/[email protected]

89.7 KB

src/effects/icons/delay.png

26.2 KB

src/effects/icons/[email protected]

92.8 KB

src/effects/icons/distortion.png

23.4 KB

src/effects/icons/[email protected]

82.7 KB

src/effects/icons/echo.png

23.6 KB

src/effects/icons/[email protected]

82 KB

src/effects/icons/expander.png

22.9 KB

src/effects/icons/[email protected]

80.7 KB

src/effects/icons/hue.png

3.25 KB

src/effects/icons/[email protected]

91.5 KB

src/effects/icons/mask.png

274 Bytes

src/effects/icons/[email protected]

29.9 KB

src/effects/icons/negate.png

2.67 KB

src/effects/icons/[email protected]

89.7 KB

src/effects/icons/noise.png

24.4 KB

src/effects/icons/[email protected]

87.7 KB

src/effects/icons/normalize.png

23.8 KB

src/effects/icons/[email protected]

85.5 KB

src/effects/icons/objectdetector.png

4.15 KB

src/effects/icons/[email protected]

65.9 KB

src/effects/icons/parametriceq.png

22.9 KB

src/effects/icons/[email protected]

81.6 KB

src/effects/icons/pixelate.png

3.62 KB

src/effects/icons/[email protected]

85.9 KB

src/effects/icons/robotization.png

22.3 KB

src/effects/icons/[email protected]

80.3 KB

src/effects/icons/saturation.png

2.45 KB

src/effects/icons/[email protected]

81.1 KB

src/effects/icons/shift.png

2.83 KB

src/effects/icons/[email protected]

86 KB

src/effects/icons/stabilizer.png

4.25 KB

src/effects/icons/[email protected]

69.2 KB

src/effects/icons/tracker.png

5.37 KB

src/effects/icons/[email protected]

66.3 KB

src/effects/icons/wave.png

2.66 KB

src/effects/icons/[email protected]

88.9 KB

src/effects/icons/whisperization.png

16.9 KB

src/effects/icons/[email protected]

59.3 KB

src/images/cache/compressor.png

13.8 KB

src/images/cache/delay.png

15.6 KB

src/images/cache/distortion.png

14.2 KB

src/images/cache/echo.png

14.4 KB

src/images/cache/expander.png

13.9 KB

src/images/cache/noise.png

14.6 KB

src/images/cache/parametriceq.png

13.8 KB

src/images/cache/robotization.png

13.7 KB

src/images/cache/whisperization.png

10.6 KB

src/language/OpenShot/OpenShot.pot

+624-524
Large diffs are not rendered by default.

src/language/OpenShot/OpenShot_blender.pot

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#, fuzzy
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: OpenShot Video Editor (version: 2.5.1-dev2)\n"
9+
"Project-Id-Version: OpenShot Video Editor (version: 2.5.1-dev3)\n"
1010
"Report-Msgid-Bugs-To: Jonathan Thomas <[email protected]>\n"
11-
"POT-Creation-Date: 2021-02-18 16:39:21.345207\n"
11+
"POT-Creation-Date: 2021-07-21 13:13:29.189114\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: Jonathan Thomas <[email protected]>\n"
1414
"Language-Team: https://translations.launchpad.net/+groups/launchpad-translators\n"

src/language/OpenShot/OpenShot_emojis.pot

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#, fuzzy
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: OpenShot Video Editor (version: 2.5.1-dev2)\n"
9+
"Project-Id-Version: OpenShot Video Editor (version: 2.5.1-dev3)\n"
1010
"Report-Msgid-Bugs-To: Jonathan Thomas <[email protected]>\n"
11-
"POT-Creation-Date: 2021-02-18 16:39:21.345207\n"
11+
"POT-Creation-Date: 2021-07-21 13:13:29.189114\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: Jonathan Thomas <[email protected]>\n"
1414
"Language-Team: https://translations.launchpad.net/+groups/launchpad-translators\n"

src/language/OpenShot/OpenShot_transitions.pot

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#, fuzzy
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: OpenShot Video Editor (version: 2.5.1-dev2)\n"
9+
"Project-Id-Version: OpenShot Video Editor (version: 2.5.1-dev3)\n"
1010
"Report-Msgid-Bugs-To: Jonathan Thomas <[email protected]>\n"
11-
"POT-Creation-Date: 2021-02-18 16:39:21.345207\n"
11+
"POT-Creation-Date: 2021-07-21 13:13:29.189114\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: Jonathan Thomas <[email protected]>\n"
1414
"Language-Team: https://translations.launchpad.net/+groups/launchpad-translators\n"

src/launch.py

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
try:
6767
# Enable High-DPI resolutions
6868
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
69+
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
6970
except AttributeError:
7071
pass # Quietly fail for older Qt5 versions
7172

src/windows/main_window.py

+19
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class MainWindow(updates.UpdateWatcher, QMainWindow):
8989
refreshFrameSignal = pyqtSignal()
9090
refreshFilesSignal = pyqtSignal()
9191
refreshTransitionsSignal = pyqtSignal()
92+
refreshEffectsSignal = pyqtSignal()
9293
LoadFileSignal = pyqtSignal(str)
9394
PlaySignal = pyqtSignal(int)
9495
PauseSignal = pyqtSignal()
@@ -834,6 +835,15 @@ def actionTransitionsShowAll_trigger(self, checked=True):
834835
def actionTransitionsShowCommon_trigger(self, checked=True):
835836
self.refreshTransitionsSignal.emit()
836837

838+
def actionEffectsShowAll_trigger(self, checked=True):
839+
self.refreshEffectsSignal.emit()
840+
841+
def actionEffectsShowVideo_trigger(self, checked=True):
842+
self.refreshEffectsSignal.emit()
843+
844+
def actionEffectsShowAudio_trigger(self, checked=True):
845+
self.refreshEffectsSignal.emit()
846+
837847
def actionHelpContents_trigger(self, checked=True):
838848
try:
839849
webbrowser.open("https://www.openshot.org/%suser-guide/?app-menu" % info.website_language(), new=1)
@@ -2500,6 +2510,15 @@ def setup_toolbars(self):
25002510
# Add effects toolbar
25012511
self.effectsToolbar = QToolBar("Effects Toolbar")
25022512
self.effectsFilter = QLineEdit()
2513+
self.effectsActionGroup = QActionGroup(self)
2514+
self.effectsActionGroup.setExclusive(True)
2515+
self.effectsActionGroup.addAction(self.actionEffectsShowAll)
2516+
self.effectsActionGroup.addAction(self.actionEffectsShowVideo)
2517+
self.effectsActionGroup.addAction(self.actionEffectsShowAudio)
2518+
self.actionEffectsShowAll.setChecked(True)
2519+
self.effectsToolbar.addAction(self.actionEffectsShowAll)
2520+
self.effectsToolbar.addAction(self.actionEffectsShowVideo)
2521+
self.effectsToolbar.addAction(self.actionEffectsShowAudio)
25032522
self.effectsFilter.setObjectName("effectsFilter")
25042523
self.effectsFilter.setPlaceholderText(_("Filter"))
25052524
self.effectsFilter.setClearButtonEnabled(True)

src/windows/models/effects_model.py

+22-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,28 @@ class EffectsProxyModel(QSortFilterProxyModel):
4747
def __init__(self, parent=None):
4848
super().__init__(parent=parent)
4949

50+
def filterAcceptsRow(self, sourceRow, sourceParent):
51+
"""Filter for common transitions and text filter"""
52+
53+
if not get_app().window.actionEffectsShowAll.isChecked():
54+
# Fetch the effect values
55+
effect_name = self.sourceModel().data(self.sourceModel().index(sourceRow, 1, sourceParent))
56+
effect_desc = self.sourceModel().data(self.sourceModel().index(sourceRow, 2, sourceParent))
57+
effect_type = self.sourceModel().data(self.sourceModel().index(sourceRow, 3, sourceParent))
58+
59+
# Return, if regExp match in displayed format.
60+
if get_app().window.actionEffectsShowVideo.isChecked():
61+
return effect_type == "Video" and \
62+
self.filterRegExp().indexIn(effect_name) >= 0 and \
63+
self.filterRegExp().indexIn(effect_desc) >= 0
64+
else:
65+
return effect_type == "Audio" and \
66+
self.filterRegExp().indexIn(effect_name) >= 0 and \
67+
self.filterRegExp().indexIn(effect_desc) >= 0
68+
69+
# Continue running built-in parent filter logic
70+
return super(EffectsProxyModel, self).filterAcceptsRow(sourceRow, sourceParent)
71+
5072
def mimeData(self, indexes):
5173
# Create MimeData for drag operation
5274
data = QMimeData()
@@ -102,7 +124,6 @@ def update_model(self, clear=True):
102124
category = "Audio & Video"
103125
elif not effect_info["has_video"] and effect_info["has_audio"]:
104126
category = "Audio"
105-
icon_path = os.path.join(icons_dir, "audio.png")
106127
elif effect_info["has_video"] and not effect_info["has_audio"]:
107128
category = "Video"
108129

src/windows/views/effects_listview.py

+1
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,4 @@ def __init__(self, model):
118118
# setup filter events
119119
app = get_app()
120120
app.window.effectsFilter.textChanged.connect(self.filter_changed)
121+
app.window.refreshEffectsSignal.connect(self.refresh_view)

0 commit comments

Comments
 (0)