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
2c04791c
Commit
2c04791c
authored
Feb 10, 2020
by
Jean-Baptiste Mardelle
Browse files
Rotoscoping: also add keyframe at current cursor pos on initial keyframe
parent
4c9841ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/assets/keyframes/model/keyframemonitorhelper.cpp
View file @
2c04791c
...
...
@@ -42,6 +42,7 @@ bool KeyframeMonitorHelper::connectMonitor(bool activate)
if
(
activate
)
{
connect
(
m_monitor
,
&
Monitor
::
effectPointsChanged
,
this
,
&
KeyframeMonitorHelper
::
slotUpdateFromMonitorData
,
Qt
::
UniqueConnection
);
}
else
{
m_monitor
->
setEffectKeyframe
(
false
);
disconnect
(
m_monitor
,
&
Monitor
::
effectPointsChanged
,
this
,
&
KeyframeMonitorHelper
::
slotUpdateFromMonitorData
);
}
return
m_active
;
...
...
src/assets/view/widgets/keyframewidget.cpp
View file @
2c04791c
...
...
@@ -430,8 +430,12 @@ void KeyframeWidget::connectMonitor(bool active)
void
KeyframeWidget
::
slotUpdateKeyframesFromMonitor
(
const
QPersistentModelIndex
&
index
,
const
QVariant
&
res
)
{
if
(
m_keyframes
->
isEmpty
())
{
// Always ensure first keyframe is at clip start
GenTime
pos
(
pCore
->
getItemIn
(
m_model
->
getOwnerId
()),
pCore
->
getCurrentFps
());
GenTime
pos
(
pCore
->
getItemIn
(
m_model
->
getOwnerId
())
+
m_time
->
getValue
(),
pCore
->
getCurrentFps
());
if
(
m_time
->
getValue
()
>
0
)
{
GenTime
pos0
(
pCore
->
getItemIn
(
m_model
->
getOwnerId
()),
pCore
->
getCurrentFps
());
m_keyframes
->
addKeyframe
(
pos0
,
KeyframeType
::
Linear
);
m_keyframes
->
updateKeyframe
(
pos0
,
res
,
index
);
}
m_keyframes
->
addKeyframe
(
pos
,
KeyframeType
::
Linear
);
m_keyframes
->
updateKeyframe
(
pos
,
res
,
index
);
}
else
if
(
m_keyframes
->
hasKeyframe
(
getPosition
())
||
m_keyframes
->
singleKeyframe
())
{
...
...
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