Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
67bab49b
Commit
67bab49b
authored
May 15, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix list parameter default value broken (rotoscoping), ensure we always have a keyframe at in point
parent
72792d49
Pipeline
#3544
passed with stage
in 14 minutes and 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/assets/model/assetparametermodel.cpp
src/assets/model/assetparametermodel.cpp
+2
-2
src/assets/view/widgets/keyframewidget.cpp
src/assets/view/widgets/keyframewidget.cpp
+3
-1
No files found.
src/assets/model/assetparametermodel.cpp
View file @
67bab49b
...
...
@@ -82,7 +82,7 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
ParamRow
currentRow
;
currentRow
.
type
=
paramTypeFromStr
(
type
);
currentRow
.
xml
=
currentParameter
;
if
(
value
.
is
Null
())
{
if
(
value
.
is
Empty
())
{
QVariant
defaultValue
=
parseAttribute
(
m_ownerId
,
QStringLiteral
(
"default"
),
currentParameter
);
value
=
defaultValue
.
type
()
==
QVariant
::
Double
?
locale
.
toString
(
defaultValue
.
toDouble
())
:
defaultValue
.
toString
();
}
...
...
@@ -538,7 +538,7 @@ QVariant AssetParameterModel::parseAttribute(const ObjectId &owner, const QStrin
if
(
ok
)
{
return
res
;
}
return
defaultValue
;
return
defaultValue
.
isNull
()
?
content
:
defaultValue
;
}
else
if
(
type
==
ParamType
::
Bezier_spline
)
{
QLocale
locale
;
if
(
locale
.
decimalPoint
()
!=
QLocale
::
c
().
decimalPoint
())
{
...
...
src/assets/view/widgets/keyframewidget.cpp
View file @
67bab49b
...
...
@@ -425,11 +425,13 @@ void KeyframeWidget::connectMonitor(bool active)
void
KeyframeWidget
::
slotUpdateKeyframesFromMonitor
(
const
QPersistentModelIndex
&
index
,
const
QVariant
&
res
)
{
GenTime
pos
(
getPosition
(),
pCore
->
getCurrentFps
());
if
(
m_keyframes
->
isEmpty
())
{
// Always ensure first keyframe is at clip start
GenTime
pos
(
pCore
->
getItemIn
(
m_model
->
getOwnerId
()),
pCore
->
getCurrentFps
());
m_keyframes
->
addKeyframe
(
pos
,
KeyframeType
::
Linear
);
m_keyframes
->
updateKeyframe
(
pos
,
res
,
index
);
}
else
if
(
m_keyframes
->
hasKeyframe
(
getPosition
())
||
m_keyframes
->
singleKeyframe
())
{
GenTime
pos
(
getPosition
(),
pCore
->
getCurrentFps
());
m_keyframes
->
updateKeyframe
(
pos
,
res
,
index
);
}
}
...
...
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