Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Heiko Becker
kdenlive
Commits
7836478b
Commit
7836478b
authored
Apr 10, 2019
by
Juku Trump
Committed by
Jean-Baptiste Mardelle
Apr 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New categorization and main effects filtering
parent
652944e1
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
115 additions
and
43 deletions
+115
-43
data/effects/README
data/effects/README
+4
-0
data/kdenliveeffectscategory.rc
data/kdenliveeffectscategory.rc
+4
-28
data/preferred_effects.txt
data/preferred_effects.txt
+49
-0
src/assets/abstractassetsrepository.hpp
src/assets/abstractassetsrepository.hpp
+7
-2
src/assets/abstractassetsrepository.ipp
src/assets/abstractassetsrepository.ipp
+10
-7
src/assets/assetlist/model/assettreemodel.cpp
src/assets/assetlist/model/assettreemodel.cpp
+1
-0
src/assets/assetlist/model/assettreemodel.hpp
src/assets/assetlist/model/assettreemodel.hpp
+1
-1
src/assets/assetlist/view/assetlistwidget.hpp
src/assets/assetlist/view/assetlistwidget.hpp
+1
-1
src/assets/assetlist/view/qml/assetList.qml
src/assets/assetlist/view/qml/assetList.qml
+2
-1
src/effects/effectlist/model/effectfilter.cpp
src/effects/effectlist/model/effectfilter.cpp
+3
-0
src/effects/effectlist/model/effecttreemodel.cpp
src/effects/effectlist/model/effecttreemodel.cpp
+2
-1
src/effects/effectlist/view/effectlistwidget.cpp
src/effects/effectlist/view/effectlistwidget.cpp
+3
-1
src/effects/effectsrepository.cpp
src/effects/effectsrepository.cpp
+10
-0
src/effects/effectsrepository.hpp
src/effects/effectsrepository.hpp
+7
-1
src/transitions/transitionsrepository.cpp
src/transitions/transitionsrepository.cpp
+7
-0
src/transitions/transitionsrepository.hpp
src/transitions/transitionsrepository.hpp
+3
-0
src/uiresources.qrc
src/uiresources.qrc
+1
-0
No files found.
data/effects/README
View file @
7836478b
...
...
@@ -137,6 +137,10 @@ Effects can be blacklisted in kdenlive/data/blacklisted_effects.txt
All effects with a custom XML GUI need to be blacklisted.
==========
==========
Effects can be added to "Main effects" list in kdenlive/data/preferred_effects.txt
==========
==========
Effects can be assigned to an effect category in kdenlive/data/kdenliveeffectscategory.rc.
==========
...
...
data/kdenliveeffectscategory.rc
View file @
7836478b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<data
name=
"effects"
version=
"0"
>
<group
list=
"lift_gamma_gain,brightness,gamma,frei0r.colgate,frei0r.balanc0r,frei0r.brightness,frei0r.levels,frei0r.three_point_balance,frei0r.curves,frei0r.coloradj_RGB,frei0r.sopsat,frei0r.bezier_curves,avfilter.selectivecolor,avfilter.lut3d"
>
<text>
Colour correction
</text>
</group>
<group
list=
"invert,sepia,tcolor,greyscale,frei0r.B,frei0r.G,frei0r.R,frei0r.contrast0r,frei0r.saturat0r,frei0r.tint0r,frei0r.primaries,chroma_hold,frei0r.colorize,frei0r.equaliz0r,frei0r.hueshift0r,frei0r.luminance,lumaliftgaingamma"
>
<group
list=
"invert,sepia,tcolor,greyscale,frei0r.B,frei0r.G,frei0r.R,frei0r.contrast0r,frei0r.saturat0r,frei0r.tint0r,frei0r.primaries,chroma_hold,frei0r.colorize,frei0r.equaliz0r,frei0r.hueshift0r,frei0r.luminance,lumaliftgaingamma,lift_gamma_gain,brightness,gamma,frei0r.colgate,frei0r.balanc0r,frei0r.brightness,frei0r.levels,frei0r.three_point_balance,frei0r.curves,frei0r.coloradj_RGB,frei0r.sopsat,frei0r.bezier_curves,avfilter.selectivecolor,avfilter.lut3d"
>
<text>
Colour
</text>
</group>
<group
list=
"frei0r.letterb0xed,pan_zoom,frei0r.scale0tilt,crop,affine,affinerotate,frei0r.nosync0r,qtblend"
>
<text>
Crop and transform
</text>
</group>
<group
list=
"volume,normalise,gain,ladspa.1049,ladspa.1048,ladspa.1413,mute"
>
<group
list=
"volume,normalise,gain,ladspa.1049,ladspa.1048,ladspa.1413,mute,fadein,fadeout,audiobalance,audiopan,swapchannels,ladspa.1406,channelcopy"
>
<text>
Audio correction
</text>
</group>
<group
list=
"audiobalance,audiopan,swapchannels,ladspa.1406,channelcopy"
>
<text>
Audio channels
</text>
</group>
<group
list=
"audiowave,audiospectrum,frei0r.pr0be,frei0r.pr0file,frei0r.rgbparade,frei0r.timeout,frei0r.vectorscope"
>
<text>
Analysis and data
</text>
</group>
<group
list=
"fade_from_black,fade_to_black,fadein,fadeout"
>
<text>
Fade
</text>
</group>
<group
list=
"fade_from_black,fade_to_black,fadein,fadeout"
>
<group
list=
"fade_from_black,fade_to_black,boxblur,obscure,autotrack_rectangle,frei0r.squareblur,frei0r.glow,frei0r.IIRblur,frei0r.edgeglow,frei0r.medians,frei0r.softglow,burningtv,charcoal,dust,frei0r.cartoon,frei0r.dither,frei0r.emboss,frei0r.posterize,frei0r.rgbnoise,frei0r.sigmoidaltransfer,frei0r.sobel,frei0r.threelay0r,frei0r.threshold0r,frei0r.twolay0r,frei0r.vignette,grain,lines,lightgraffiti,oldfilm,threshold,wave,mirror,frei0r.distort0r,frei0r.lenscorrection,frei0r.defish0r,frei0r.pixeliz0r,frei0r.d90stairsteppingfix,frei0r.hqdn3d,frei0r.sharpness,frei0r.spillsupress"
>
<text>
Image adjustment
</text>
</group>
<group
list=
"burningtv,charcoal,dust,frei0r.cartoon,frei0r.dither,frei0r.emboss,frei0r.posterize,frei0r.rgbnoise,frei0r.sigmoidaltransfer,frei0r.sobel,frei0r.threelay0r,frei0r.threshold0r,frei0r.twolay0r,frei0r.vignette,grain,lines,lightgraffiti,oldfilm,threshold,vignette"
>
<text>
Artistic
</text>
</group>
<group
list=
"boxblur,obscure,autotrack_rectangle,frei0r.squareblur,frei0r.glow,frei0r.IIRblur,frei0r.edgeglow,frei0r.medians,frei0r.softglow"
>
<text>
Blur and hide
</text>
</group>
<group
list=
"speed,freeze"
>
<text>
Motion
</text>
</group>
<group
list=
"wave,mirror,frei0r.distort0r,frei0r.lenscorrection,frei0r.c0rners,frei0r.defish0r,frei0r.pixeliz0r"
>
<text>
Distort
</text>
</group>
<group
list=
"chroma,frei0r.alpha0ps,frei0r.alphagrad,frei0r.alphaspot,frei0r.transparency,frei0r.select0r,frei0r.mask0mate,rotoscoping,frei0r.keyspillm0pup"
>
<group
list=
"chroma,frei0r.alpha0ps,frei0r.alphagrad,frei0r.alphaspot,frei0r.transparency,frei0r.select0r,frei0r.mask0mate,rotoscoping,frei0r.keyspillm0pup,frei0r.c0rners,crop,affine,qtblend,vignette,frei0r.letterb0xed,pan_zoom,frei0r.scale0tilt,affinerotate,frei0r.nosync0r"
>
<text>
Alpha/Transform
</text>
</group>
<group
list=
"frei0r.d90stairsteppingfix,frei0r.hqdn3d,frei0r.sharpness,frei0r.spillsupress"
>
<text>
Enhancement
</text>
</group>
<group
list=
"movit.blur,movit.sharpen,movit.diffusion,movit.glow,movit.lift_gamma_gain,movit.mirror,movit.opacity,movit.rect,movit.saturation,movit.unsharp_mask,movit.vignette,movit.white_balance"
>
<text>
GPU effects
</text>
</group>
...
...
data/preferred_effects.txt
0 → 100644
View file @
7836478b
affinerotate
audiopan
audiospectrum
boxblur
brightness
charcoal
crop
frei0r.alphagrad
frei0r.bezier_curves
frei0r.c0rners
frei0r.colgate
frei0r.coloradj_RGB
frei0r.colorize
frei0r.contrast0r
frei0r.defish0r
frei0r.distort0r
frei0r.dither
frei0r.edgeglow
frei0r.emboss
frei0r.hqdn3d
frei0r.IIRblur
frei0r.keyspillm0pup
frei0r.lenscorrection
frei0r.pixeliz0r
frei0r.pr0be
frei0r.pr0file
frei0r.rgbnoise
frei0r.rgbparade
frei0r.saturat0r
frei0r.select0r
frei0r.sharpness
frei0r.sigmoidaltransfer
frei0r.softglow
frei0r.three_point_balance
frei0r.vectorscope
gain
gamma
grain
invert
lift_gamma_gain
mirror
mute
normalise
oldfilm
qtblend
rotoscoping
speed
vignette
volume
src/assets/abstractassetsrepository.hpp
View file @
7836478b
...
...
@@ -71,8 +71,8 @@ protected:
AssetType
type
;
};
// Reads the
blacklist file and populate
appropriate structure
void
parse
BlackList
(
const
QString
&
path
);
// Reads the
asset list from file and populates
appropriate structure
void
parse
AssetList
(
const
QString
&
filePath
,
QSet
<
QString
>
&
destination
);
void
init
();
virtual
Mlt
::
Properties
*
retrieveListFromMlt
()
const
=
0
;
...
...
@@ -106,9 +106,14 @@ protected:
/* @brief Returns the path to the assets' blacklist*/
virtual
QString
assetBlackListPath
()
const
=
0
;
/* @brief Returns the path to the assets' preferred list*/
virtual
QString
assetPreferredListPath
()
const
=
0
;
std
::
unordered_map
<
QString
,
Info
>
m_assets
;
QSet
<
QString
>
m_blacklist
;
QSet
<
QString
>
m_preferred_list
;
};
#include "abstractassetsrepository.ipp"
...
...
src/assets/abstractassetsrepository.ipp
View file @
7836478b
...
...
@@ -43,7 +43,10 @@ template <typename AssetType> void AbstractAssetsRepository<AssetType>::init()
#endif
// Parse effects blacklist
parseBlackList(assetBlackListPath());
parseAssetList(assetBlackListPath(), m_blacklist);
// Parse preferred effects' list
parseAssetList(assetPreferredListPath(), m_preferred_list);
// Retrieve the list of MLT's available assets.
QScopedPointer<Mlt::Properties> assets(retrieveListFromMlt());
...
...
@@ -108,19 +111,19 @@ template <typename AssetType> void AbstractAssetsRepository<AssetType>::init()
}
}
template <typename AssetType> void AbstractAssetsRepository<AssetType>::parse
BlackList(const QString &path
)
template <typename AssetType> void AbstractAssetsRepository<AssetType>::parse
AssetList(const QString &filePath, QSet<QString> &destination
)
{
QFile
blacklist_file(p
ath);
if (
blacklist_f
ile.open(QIODevice::ReadOnly)) {
QTextStream stream(&
blacklist_f
ile);
QFile
assetFile(fileP
ath);
if (
assetF
ile.open(QIODevice::ReadOnly)) {
QTextStream stream(&
assetF
ile);
QString line;
while (stream.readLineInto(&line)) {
line = line.simplified();
if (!line.isEmpty() && !line.startsWith('#')) {
m_blacklist
.insert(line);
destination
.insert(line);
}
}
blacklist_f
ile.close();
assetF
ile.close();
}
}
...
...
src/assets/assetlist/model/assettreemodel.cpp
View file @
7836478b
...
...
@@ -28,6 +28,7 @@ int AssetTreeModel::nameCol = 0;
int
AssetTreeModel
::
idCol
=
1
;
int
AssetTreeModel
::
typeCol
=
2
;
int
AssetTreeModel
::
favCol
=
3
;
int
AssetTreeModel
::
preferredCol
=
5
;
AssetTreeModel
::
AssetTreeModel
(
QObject
*
parent
)
:
AbstractTreeModel
(
parent
)
...
...
src/assets/assetlist/model/assettreemodel.hpp
View file @
7836478b
...
...
@@ -50,7 +50,7 @@ public:
virtual
void
setFavorite
(
const
QModelIndex
&
index
,
bool
favorite
,
bool
isEffect
)
=
0
;
// for convenience, we store the column of each data field
static
int
nameCol
,
idCol
,
favCol
,
typeCol
;
static
int
nameCol
,
idCol
,
favCol
,
typeCol
,
preferredCol
;
protected:
};
...
...
src/assets/assetlist/view/assetlistwidget.hpp
View file @
7836478b
...
...
@@ -49,7 +49,7 @@ public:
/* @brief Returns true if this effect belongs to favorites */
bool
isFavorite
(
const
QModelIndex
&
index
)
const
;
/* @brief
Returns true if
this effect belongs to favorites */
/* @brief
Sets whether
this effect belongs to favorites */
void
setFavorite
(
const
QModelIndex
&
index
,
bool
favorite
=
true
,
bool
isEffect
=
true
);
/* @brief Returns the description of the asset given its model index */
...
...
src/assets/assetlist/view/qml/assetList.qml
View file @
7836478b
...
...
@@ -80,7 +80,8 @@ Rectangle {
ToolButton
{
id
:
showAll
iconName
:
"
show-all-effects
"
checkable
:
true
checkable
:
true
checked
:
true
exclusiveGroup
:
filterGroup
tooltip
:
i18n
(
'
Main %1
'
,
assetType
())
onClicked
:
{
...
...
src/effects/effectlist/model/effectfilter.cpp
View file @
7836478b
...
...
@@ -56,6 +56,9 @@ bool EffectFilter::filterType(const std::shared_ptr<TreeItem> &item) const
if
(
m_type_value
==
EffectType
::
Favorites
)
{
return
item
->
dataColumn
(
AssetTreeModel
::
favCol
).
toBool
();
}
if
(
m_type_value
==
EffectType
::
Preferred
)
{
return
item
->
dataColumn
(
AssetTreeModel
::
preferredCol
).
toBool
();
}
return
itemType
==
m_type_value
;
}
...
...
src/effects/effectlist/model/effecttreemodel.cpp
View file @
7836478b
...
...
@@ -107,8 +107,9 @@ std::shared_ptr<EffectTreeModel> EffectTreeModel::construct(const QString &categ
// we create the data list corresponding to this profile
bool
isFav
=
KdenliveSettings
::
favorite_effects
().
contains
(
effect
.
first
);
bool
isPreferred
=
EffectsRepository
::
get
()
->
isPreferred
(
effect
.
first
);
//qDebug() << effect.second << effect.first << "in " << targetCategory->dataColumn(0).toString();
QList
<
QVariant
>
data
{
effect
.
second
,
effect
.
first
,
QVariant
::
fromValue
(
type
),
isFav
,
targetCategory
->
row
()};
QList
<
QVariant
>
data
{
effect
.
second
,
effect
.
first
,
QVariant
::
fromValue
(
type
),
isFav
,
targetCategory
->
row
()
,
isPreferred
};
if
(
KdenliveSettings
::
favorite_effects
().
contains
(
effect
.
first
)
&&
effectCategory
.
contains
(
favCategory
))
{
targetCategory
=
effectCategory
[
favCategory
];
}
...
...
src/effects/effectlist/view/effectlistwidget.cpp
View file @
7836478b
...
...
@@ -47,6 +47,8 @@ EffectListWidget::EffectListWidget(QWidget *parent)
m_assetIconProvider
=
new
AssetIconProvider
(
true
);
setup
();
// Activate "Main effects" filter
setFilterType
(
""
);
}
void
EffectListWidget
::
updateFavorite
(
const
QModelIndex
&
index
)
...
...
@@ -73,7 +75,7 @@ void EffectListWidget::setFilterType(const QString &type)
}
else
if
(
type
==
"favorites"
)
{
static_cast
<
EffectFilter
*>
(
m_proxyModel
.
get
())
->
setFilterType
(
true
,
EffectType
::
Favorites
);
}
else
{
static_cast
<
EffectFilter
*>
(
m_proxyModel
.
get
())
->
setFilterType
(
false
,
EffectType
::
Video
);
static_cast
<
EffectFilter
*>
(
m_proxyModel
.
get
())
->
setFilterType
(
true
,
EffectType
::
Preferred
);
}
}
...
...
src/effects/effectsrepository.cpp
View file @
7836478b
...
...
@@ -158,6 +158,16 @@ QString EffectsRepository::assetBlackListPath() const
return
QStringLiteral
(
":data/blacklisted_effects.txt"
);
}
QString
EffectsRepository
::
assetPreferredListPath
()
const
{
return
QStringLiteral
(
":data/preferred_effects.txt"
);
}
bool
EffectsRepository
::
isPreferred
(
const
QString
&
effectId
)
const
{
return
m_preferred_list
.
contains
(
effectId
);
}
std
::
unique_ptr
<
Mlt
::
Filter
>
EffectsRepository
::
getEffect
(
const
QString
&
effectId
)
const
{
Q_ASSERT
(
exists
(
effectId
));
...
...
src/effects/effectsrepository.hpp
View file @
7836478b
...
...
@@ -35,7 +35,7 @@
* Note that this class is a Singleton
*/
enum
class
EffectType
{
Video
,
Audio
,
Custom
,
Favorites
,
Hidden
};
enum
class
EffectType
{
Preferred
,
Video
,
Audio
,
Custom
,
Favorites
,
Hidden
};
Q_DECLARE_METATYPE
(
EffectType
)
class
EffectsRepository
:
public
AbstractAssetsRepository
<
EffectType
>
...
...
@@ -51,6 +51,9 @@ public:
bool
hasInternalEffect
(
const
QString
&
effectId
)
const
;
QPair
<
QString
,
QString
>
reloadCustom
(
const
QString
&
path
);
/* @brief Returns whether this belongs to main effects */
bool
isPreferred
(
const
QString
&
effectId
)
const
;
protected:
// Constructor is protected because class is a Singleton
EffectsRepository
();
...
...
@@ -66,6 +69,9 @@ protected:
/* @brief Returns the path to the effects' blacklist*/
QString
assetBlackListPath
()
const
override
;
/* @brief Returns the path to the effects' preferred list*/
QString
assetPreferredListPath
()
const
override
;
QStringList
assetDirs
()
const
override
;
void
parseType
(
QScopedPointer
<
Mlt
::
Properties
>
&
metadata
,
Info
&
res
)
override
;
...
...
src/transitions/transitionsrepository.cpp
View file @
7836478b
...
...
@@ -146,6 +146,13 @@ QString TransitionsRepository::assetBlackListPath() const
return
QStringLiteral
(
":data/blacklisted_transitions.txt"
);
}
QString
TransitionsRepository
::
assetPreferredListPath
()
const
{
// Transitions do not have "Main" filter implemented, so we return an empty
// string instead of path to a file with that list
return
QStringLiteral
(
""
);
}
std
::
unique_ptr
<
Mlt
::
Transition
>
TransitionsRepository
::
getTransition
(
const
QString
&
transitionId
)
const
{
Q_ASSERT
(
exists
(
transitionId
));
...
...
src/transitions/transitionsrepository.hpp
View file @
7836478b
...
...
@@ -71,6 +71,9 @@ protected:
/* @brief Returns the path to the transitions' blacklist*/
QString
assetBlackListPath
()
const
override
;
/* @brief Returns the path to the effects' preferred list*/
QString
assetPreferredListPath
()
const
override
;
void
parseType
(
QScopedPointer
<
Mlt
::
Properties
>
&
metadata
,
Info
&
res
)
override
;
/* @brief Returns the metadata associated with the given asset*/
...
...
src/uiresources.qrc
View file @
7836478b
...
...
@@ -45,6 +45,7 @@
<qresource prefix="data">
<file alias="blacklisted_effects.txt">../data/blacklisted_effects.txt</file>
<file alias="blacklisted_transitions.txt">../data/blacklisted_transitions.txt</file>
<file alias="preferred_effects.txt">../data/preferred_effects.txt</file>
<file alias="kdenlive_renderprofiles.knsrc">../data/kdenlive_renderprofiles.knsrc</file>
<file alias="kdenlive_titles.knsrc">../data/kdenlive_titles.knsrc</file>
<file alias="kdenlive_wipes.knsrc">../data/kdenlive_wipes.knsrc</file>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment