Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
55f3848c
Commit
55f3848c
authored
Oct 14, 2016
by
Jean-Baptiste Mardelle
Browse files
Add proper UI for lut3d effect (avfilter), patch by alcinos
REVIEW: 129145
parent
c71731d4
Changes
7
Hide whitespace changes
Inline
Side-by-side
data/blacklisted_effects.txt
View file @
55f3848c
...
...
@@ -178,5 +178,6 @@ avfilter.volumedetect
avfilter.acompressor
avfilter.aecho
avfilter.agate
avfilter.lut3d
avfilter.selectivecolor
data/effects/README
View file @
55f3848c
...
...
@@ -109,6 +109,8 @@ The rest:
- "url":
- url/path
- represented by button to open "file open" dialog
- additional attributes:
- "filter": Filter for file extensions. Example : "*.cpp *.cc *.C|C++ Source Files\n*.h *.H|Header files" or as using mimetype: "image/png text/html"
- "wipe":
- special GUI for the wipe transition makes it possible to select a direction of a slide
- "addedgeometry":
...
...
data/effects/avfilter/CMakeLists.txt
View file @
55f3848c
...
...
@@ -4,4 +4,5 @@ acompressor.xml
aecho.xml
agate.xml
selectivecolor.xml
avfilter_lut3d.xml
DESTINATION
${
DATA_INSTALL_DIR
}
/kdenlive/effects
)
data/effects/avfilter/avfilter_lut3d.xml
0 → 100644
View file @
55f3848c
<!DOCTYPE kpartgui>
<effect
tag=
"avfilter.lut3d"
id=
"avfilter.lut3d"
>
<name>
Apply LUT
</name>
<description>
Apply a Look Up Table (LUT) to the video.
<full>
<![CDATA[A LUT is an easy way to correct the color of a video. Supported formats: .3dl (AfterEffects), .cube (Iridas), .dat(DaVinci), .m3d (Pandora)]]>
</full></description>
<author>
libavfilter
</author>
<parameter
type=
"url"
name=
"av.file"
filter=
"*.cube *.3dl *.dat *.m3d|LUT files"
>
<name>
LUT file to apply
</name>
</parameter>
<parameter
type=
"list"
name=
"av.interp"
default=
"0"
paramlist=
"nearest;trilinear;tetrahedral "
>
<name>
Interpolation Mode
</name>
<paramlistdisplay>
Nearest, Trilinear, Tetrahedral
</paramlistdisplay>
</parameter>
</effect>
data/kdenliveeffectscategory.rc
View file @
55f3848c
<?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"
>
<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"
>
...
...
src/effectstack/parametercontainer.cpp
View file @
55f3848c
...
...
@@ -256,7 +256,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
}
else
if
(
type
==
QLatin1String
(
"list"
))
{
Listval
*
lsval
=
new
Listval
;
lsval
->
setupUi
(
toFillin
);
lsval
->
list
->
setFocusPolicy
(
Qt
::
StrongFocus
);
lsval
->
list
->
setFocusPolicy
(
Qt
::
StrongFocus
);
QString
items
=
pa
.
attribute
(
QStringLiteral
(
"paramlist"
));
QStringList
listitems
;
if
(
items
==
QLatin1String
(
"%lumaPaths"
))
{
...
...
@@ -304,7 +304,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
if
(
!
value
.
isEmpty
()
&&
listitems
.
contains
(
value
))
lsval
->
list
->
setCurrentIndex
(
listitems
.
indexOf
(
value
));
}
lsval
->
name
->
setText
(
paramName
);
lsval
->
setToolTip
(
comment
);
lsval
->
setToolTip
(
comment
);
lsval
->
labelComment
->
setText
(
comment
);
lsval
->
widgetComment
->
setHidden
(
true
);
if
(
m_conditionParameter
&&
pa
.
hasAttribute
(
QStringLiteral
(
"conditional"
)))
{
...
...
@@ -612,8 +612,11 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
Urlval
*
cval
=
new
Urlval
;
cval
->
setupUi
(
toFillin
);
cval
->
label
->
setText
(
paramName
);
cval
->
setToolTip
(
comment
);
cval
->
urlwidget
->
setFilter
(
ClipCreationDialog
::
getExtensions
().
join
(
' '
));
cval
->
setToolTip
(
comment
);
cval
->
widgetComment
->
setHidden
(
true
);
QString
filter
=
pa
.
attribute
(
QStringLiteral
(
"filter"
));
if
(
filter
.
size
()
>
0
)
cval
->
urlwidget
->
setFilter
(
filter
);
m_valueItems
[
paramName
]
=
cval
;
cval
->
urlwidget
->
setUrl
(
QUrl
(
value
));
connect
(
cval
->
urlwidget
,
SIGNAL
(
returnPressed
())
,
this
,
SLOT
(
slotCollectAllParameters
()));
...
...
@@ -986,21 +989,21 @@ void ParameterContainer::slotCollectAllParameters()
setValue
=
locale
.
toString
(
doubleparam
->
getValue
());
}
}
else
if
(
type
==
QLatin1String
(
"list"
))
{
Listval
*
val
=
static_cast
<
Listval
*>
(
m_valueItems
.
value
(
paramName
));
Listval
*
val
=
static_cast
<
Listval
*>
(
m_valueItems
.
value
(
paramName
));
if
(
val
)
{
KComboBox
*
box
=
val
->
list
;
setValue
=
box
->
itemData
(
box
->
currentIndex
()).
toString
();
KComboBox
*
box
=
val
->
list
;
setValue
=
box
->
itemData
(
box
->
currentIndex
()).
toString
();
// special case, list value is allowed to be empty
pa
.
setAttribute
(
QStringLiteral
(
"value"
),
setValue
);
setValue
.
clear
();
}
}
}
else
if
(
type
==
QLatin1String
(
"bool"
))
{
Boolval
*
val
=
static_cast
<
Boolval
*>
(
m_valueItems
.
value
(
paramName
));
Boolval
*
val
=
static_cast
<
Boolval
*>
(
m_valueItems
.
value
(
paramName
));
if
(
val
)
{
QCheckBox
*
box
=
val
->
checkBox
;
setValue
=
box
->
checkState
()
==
Qt
::
Checked
?
"1"
:
"0"
;
}
}
else
if
(
type
==
QLatin1String
(
"switch"
))
{
QCheckBox
*
box
=
val
->
checkBox
;
setValue
=
box
->
checkState
()
==
Qt
::
Checked
?
"1"
:
"0"
;
}
}
else
if
(
type
==
QLatin1String
(
"switch"
))
{
Boolval
*
val
=
static_cast
<
Boolval
*>
(
m_valueItems
.
value
(
paramName
));
if
(
val
)
{
QCheckBox
*
box
=
val
->
checkBox
;
...
...
@@ -1009,7 +1012,7 @@ void ParameterContainer::slotCollectAllParameters()
}
else
if
(
type
==
QLatin1String
(
"color"
))
{
ChooseColorWidget
*
choosecolor
=
static_cast
<
ChooseColorWidget
*>
(
m_valueItems
.
value
(
paramName
));
if
(
choosecolor
)
setValue
=
choosecolor
->
getColor
();
if
(
pa
.
hasAttribute
(
QStringLiteral
(
"paramprefix"
)))
setValue
.
prepend
(
pa
.
attribute
(
QStringLiteral
(
"paramprefix"
)));
if
(
pa
.
hasAttribute
(
QStringLiteral
(
"paramprefix"
)))
setValue
.
prepend
(
pa
.
attribute
(
QStringLiteral
(
"paramprefix"
)));
}
else
if
(
type
==
QLatin1String
(
"geometry"
))
{
if
(
m_geometryWidget
)
namenode
.
item
(
i
).
toElement
().
setAttribute
(
QStringLiteral
(
"value"
),
m_geometryWidget
->
getValue
());
}
else
if
(
type
==
QLatin1String
(
"addedgeometry"
))
{
...
...
src/ui/urlval_ui.ui
View file @
55f3848c
...
...
@@ -11,26 +11,77 @@
</rect>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<property
name=
"verticalSpacing"
>
<number>
0
</number>
</property>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item
row=
"1"
column=
"1"
>
<widget
class=
"KUrlRequester"
name=
"urlwidget"
/>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Param
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
</layout>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<item
row=
"0"
column=
"0"
colspan=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
1
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"KUrlRequester"
name=
"urlwidget"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
1
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"QWidget"
name=
"widgetComment"
native=
"true"
>
<layout
class=
"QGridLayout"
name=
"_2"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
15
</number>
</property>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"labelComment"
>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<property
name=
"textFormat"
>
<enum>
Qt::RichText
</enum>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
</property>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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