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
8872d5b4
Commit
8872d5b4
authored
Oct 31, 2022
by
Julius Künzel
💬
Browse files
[Code Gardening] Entirely remove already unsupported (Asset) ParamTypes
parent
b644d247
Changes
6
Hide whitespace changes
Inline
Side-by-side
data/effects/README.md
View file @
8872d5b4
...
...
@@ -218,10 +218,6 @@ You can set `default` to `"adjustcenter"` to adjust the geometry to the frame s
*
special GUI for the wipe transition makes it possible to select a direction of a slide
##### `"addedgeometry"`
*
parameter linked to a "geometry" parameter
##### `"curve"`
*
cubic curve editor for the frei0r color curves filter (old version)
...
...
src/assets/model/assetparametermodel.cpp
View file @
8872d5b4
...
...
@@ -158,9 +158,6 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
case
ParamType
::
Fontfamily
:
case
ParamType
::
Keywords
:
case
ParamType
::
Readonly
:
case
ParamType
::
RestrictedAnim
:
// Fine because unsupported
case
ParamType
::
Animated
:
// Fine because unsupported
case
ParamType
::
Addedgeometry
:
// Fine because unsupported
case
ParamType
::
Url
:
case
ParamType
::
UrlList
:
// All fine
...
...
@@ -665,8 +662,6 @@ ParamType AssetParameterModel::paramTypeFromStr(const QString &type)
return
ParamType
::
AnimatedRect
;
}
else
if
(
type
==
QLatin1String
(
"geometry"
))
{
return
ParamType
::
Geometry
;
}
else
if
(
type
==
QLatin1String
(
"addedgeometry"
))
{
return
ParamType
::
Addedgeometry
;
}
else
if
(
type
==
QLatin1String
(
"keyframe"
)
||
type
==
QLatin1String
(
"animated"
))
{
return
ParamType
::
KeyframeParam
;
}
else
if
(
type
==
QLatin1String
(
"color"
))
{
...
...
@@ -837,9 +832,7 @@ QVariant AssetParameterModel::parseAttribute(const ObjectId &owner, const QStrin
return
converted
;
}
if
(
attribute
==
QLatin1String
(
"default"
))
{
if
(
type
==
ParamType
::
RestrictedAnim
)
{
content
=
getDefaultKeyframes
(
0
,
content
,
true
);
}
else
if
(
type
==
ParamType
::
KeyframeParam
)
{
if
(
type
==
ParamType
::
KeyframeParam
)
{
return
content
.
toDouble
();
}
else
if
(
type
==
ParamType
::
List
)
{
bool
ok
;
...
...
src/assets/model/assetparametermodel.hpp
View file @
8872d5b4
...
...
@@ -27,11 +27,8 @@ enum class ParamType {
Bool
,
Switch
,
MultiSwitch
,
RestrictedAnim
,
// animated 1 dimensional param with linear support only
Animated
,
AnimatedRect
,
// Animated rects have X, Y, width, height, and opacity (in [0,1])
Geometry
,
Addedgeometry
,
KeyframeParam
,
Color
,
ColorWheel
,
...
...
src/assets/view/assetparameterview.cpp
View file @
8872d5b4
...
...
@@ -76,8 +76,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
for
(
int
i
=
0
;
i
<
model
->
rowCount
();
++
i
)
{
QModelIndex
index
=
model
->
index
(
i
,
0
);
auto
type
=
model
->
data
(
index
,
AssetParameterModel
::
TypeRole
).
value
<
ParamType
>
();
if
(
m_mainKeyframeWidget
&&
(
type
==
ParamType
::
Geometry
||
type
==
ParamType
::
Animated
||
type
==
ParamType
::
RestrictedAnim
||
type
==
ParamType
::
KeyframeParam
||
type
==
ParamType
::
ColorWheel
))
{
if
(
m_mainKeyframeWidget
&&
(
type
==
ParamType
::
Geometry
||
type
==
ParamType
::
KeyframeParam
||
type
==
ParamType
::
ColorWheel
))
{
// Keyframe widget can have some extra params that shouldn't build a new widget
qDebug
()
<<
"// FOUND ADDED PARAM"
;
if
(
type
!=
ParamType
::
ColorWheel
)
{
...
...
src/assets/view/widgets/abstractparamwidget.cpp
View file @
8872d5b4
...
...
@@ -140,9 +140,6 @@ AbstractParamWidget *AbstractParamWidget::construct(const std::shared_ptr<AssetP
widget
=
new
KeywordParamWidget
(
model
,
index
,
parent
);
break
;
}
case
ParamType
::
Animated
:
case
ParamType
::
RestrictedAnim
:
case
ParamType
::
Addedgeometry
:
default:
// not reimplemented
widget
=
new
Unsupported
(
model
,
index
,
parent
);
...
...
src/assets/view/widgets/keyframeimport.cpp
View file @
8872d5b4
...
...
@@ -73,7 +73,7 @@ KeyframeImport::KeyframeImport(const QString &animData, std::shared_ptr<AssetPar
int
spaces
=
first
.
count
(
QLatin1Char
(
' '
));
switch
(
spaces
)
{
case
0
:
currentParam
.
insert
(
QLatin1String
(
"type"
),
QJsonValue
(
int
(
ParamType
::
Animated
)));
currentParam
.
insert
(
QLatin1String
(
"type"
),
QJsonValue
(
int
(
ParamType
::
Hidden
)));
break
;
default:
currentParam
.
insert
(
QLatin1String
(
"type"
),
QJsonValue
(
int
(
ParamType
::
AnimatedRect
)));
...
...
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