Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Farid Abdelnour
kdenlive
Commits
94d2efb9
Commit
94d2efb9
authored
Dec 14, 2018
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix keyframes import
parent
fcdda32a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/effectstack/widgets/keyframeimport.cpp
src/effectstack/widgets/keyframeimport.cpp
+2
-2
src/timeline/keyframeview.cpp
src/timeline/keyframeview.cpp
+2
-2
No files found.
src/effectstack/widgets/keyframeimport.cpp
View file @
94d2efb9
...
...
@@ -223,8 +223,8 @@ void KeyframeImport::resizeEvent(QResizeEvent *ev)
void
KeyframeImport
::
updateDataDisplay
()
{
QString
d
ata
=
m_dataCombo
->
currentData
().
toString
();
m_maximas
=
m_keyframeView
->
loadKeyframes
(
d
ata
);
QString
frameD
ata
=
m_dataCombo
->
currentData
().
toString
();
m_maximas
=
m_keyframeView
->
loadKeyframes
(
frameD
ata
);
double
wDist
=
m_maximas
.
at
(
2
).
y
()
-
m_maximas
.
at
(
2
).
x
();
double
hDist
=
m_maximas
.
at
(
3
).
y
()
-
m_maximas
.
at
(
3
).
x
();
if
(
wDist
==
0
&&
hDist
==
0
)
{
...
...
src/timeline/keyframeview.cpp
View file @
94d2efb9
...
...
@@ -376,7 +376,6 @@ QString KeyframeView::getSingleAnimation(int ix, int in, int out, int offset, in
m_keyProperties
.
set
(
"kdenlive_import"
,
""
);
int
newduration
=
out
-
in
+
offset
;
m_keyProperties
.
anim_get_double
(
"kdenlive_import"
,
0
,
newduration
);
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
double
factor
=
(
max
-
min
)
/
(
maximas
.
y
()
-
maximas
.
x
());
mlt_rect
rect
=
m_keyProperties
.
anim_get_rect
(
m_inTimeline
.
toUtf8
().
constData
(),
in
,
duration
);
double
value
;
...
...
@@ -449,6 +448,7 @@ QString KeyframeView::getSingleAnimation(int ix, int in, int out, int offset, in
next
=
m_keyAnim
.
next_key
(
next
+
1
);
}
}
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
QString
result
=
anim
.
serialize_cut
();
m_keyProperties
.
set
(
"kdenlive_import"
,
(
char
*
)
nullptr
);
return
result
;
...
...
@@ -461,7 +461,6 @@ QString KeyframeView::getOffsetAnimation(int in, int out, int offset, int limitK
int
pWidth
=
profile
.
profileSize
.
width
();
int
pHeight
=
profile
.
profileSize
.
height
();
m_keyProperties
.
anim_get_double
(
"kdenlive_import"
,
0
,
newduration
);
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
mlt_keyframe_type
kftype
=
(
limitKeyframes
>
0
&&
allowAnimation
)
?
mlt_keyframe_smooth
:
mlt_keyframe_linear
;
mlt_rect
rect
=
m_keyProperties
.
anim_get_rect
(
m_inTimeline
.
toUtf8
().
constData
(),
in
,
duration
);
rect
.
x
=
(
int
)
rect
.
x
;
...
...
@@ -506,6 +505,7 @@ QString KeyframeView::getOffsetAnimation(int in, int out, int offset, int limitK
m_keyProperties
.
anim_set
(
"kdenlive_import"
,
rect
,
offset
+
pos
-
in
,
newduration
,
kftype
);
}
}
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
QString
result
=
anim
.
serialize_cut
();
m_keyProperties
.
set
(
"kdenlive_import"
,
(
char
*
)
nullptr
);
return
result
;
...
...
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