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
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
Multimedia
Kdenlive
Commits
7c8de1f6
Commit
7c8de1f6
authored
Aug 05, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MLT's Pillar Echo effect
parent
7d0b60c9
Pipeline
#29744
passed with stage
in 28 minutes and 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
data/effects/CMakeLists.txt
data/effects/CMakeLists.txt
+1
-0
data/effects/pillar_echo.xml
data/effects/pillar_echo.xml
+12
-0
src/assets/model/assetparametermodel.cpp
src/assets/model/assetparametermodel.cpp
+25
-3
No files found.
data/effects/CMakeLists.txt
View file @
7c8de1f6
...
...
@@ -28,6 +28,7 @@ mute.xml
normalise.xml
oldfilm.xml
pan_zoom.xml
pillar_echo.xml
obscure.xml
region.xml
rotation.xml
...
...
data/effects/pillar_echo.xml
0 → 100644
View file @
7c8de1f6
<!DOCTYPE kpartgui>
<effect
tag=
"pillar_echo"
id=
"pillar_echo"
>
<name>
Pillar Echo
</name>
<description>
Create an echo effect (blur) outside of an area of interest.
</description>
<author>
Meltytech, LLC
</author>
<parameter
type=
"animatedrect"
name=
"rect"
default=
"25% 0% 50% 100%"
fixed=
"1"
opacity=
"false"
>
<name>
Rectangle
</name>
</parameter>
<parameter
type=
"constant"
name=
"blur"
max=
"50"
min=
"0"
default=
"4"
suffix=
"%"
>
<name>
Blur
</name>
</parameter>
</effect>
src/assets/model/assetparametermodel.cpp
View file @
7c8de1f6
...
...
@@ -544,7 +544,7 @@ ParamType AssetParameterModel::paramTypeFromStr(const QString &type)
return
ParamType
::
Switch
;
}
else
if
(
type
==
QLatin1String
(
"simplekeyframe"
))
{
return
ParamType
::
KeyframeParam
;
}
else
if
(
type
==
QLatin1String
(
"animatedrect"
))
{
}
else
if
(
type
==
QLatin1String
(
"animatedrect"
)
||
type
==
QLatin1String
(
"rect"
)
)
{
return
ParamType
::
AnimatedRect
;
}
else
if
(
type
==
QLatin1String
(
"geometry"
))
{
return
ParamType
::
Geometry
;
...
...
@@ -628,8 +628,30 @@ QVariant AssetParameterModel::parseAttribute(const ObjectId &owner, const QStrin
.
replace
(
QLatin1String
(
"%height"
),
QString
::
number
(
height
))
.
replace
(
QLatin1String
(
"%out"
),
QString
::
number
(
out
))
.
replace
(
QLatin1String
(
"%fade"
),
QString
::
number
(
frame_duration
));
if
(
type
==
ParamType
::
Double
||
type
==
ParamType
::
Hidden
)
{
if
(
type
==
ParamType
::
AnimatedRect
&&
attribute
==
QLatin1String
(
"default"
))
{
if
(
content
.
contains
(
QLatin1Char
(
'%'
)))
{
// This is a generic default like: "25% 0% 50% 100%". Parse values
QStringList
numbers
=
content
.
split
(
QLatin1Char
(
' '
));
content
.
clear
();
int
ix
=
0
;
for
(
QString
&
val
:
numbers
)
{
if
(
val
.
endsWith
(
QLatin1Char
(
'%'
)))
{
val
.
chop
(
1
);
double
n
=
val
.
toDouble
()
/
100.
;
if
(
ix
%
2
==
0
)
{
n
*=
width
;
}
else
{
n
*=
height
;
}
ix
++
;
content
.
append
(
QString
(
"%1 "
).
arg
(
qRound
(
n
)));
}
else
{
content
.
append
(
QString
(
"%1 "
).
arg
(
val
));
}
}
}
}
else
if
(
type
==
ParamType
::
Double
||
type
==
ParamType
::
Hidden
)
{
// Use a Mlt::Properties to parse mathematical operators
Mlt
::
Properties
p
;
p
.
set
(
"eval"
,
content
.
prepend
(
QLatin1Char
(
'@'
)).
toLatin1
().
constData
());
...
...
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