Bug 438917 - Animation curves: Inserting new keyframe from "insert button" is not working properly
Summary: Animation curves: Inserting new keyframe from "insert button" is not working ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 438342 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-19 15:35 UTC by grum999
Modified: 2021-07-26 17:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description grum999 2021-06-19 15:35:07 UTC
SUMMARY

Follow problem (A) described in bug:
https://bugs.kde.org/show_bug.cgi?id=438766#c0

I create a dedicated bug.
Note: video in bug 438766 is still available for problem [from 0:00 to 0:07]


STEPS TO REPRODUCE
1. Create a paint layer with a rectangle
2. Add a transform mask on paint layer
3. Create some keyframes in animation curves
4. Start to navigate between keyframe
5. Click on "insert keyframe" (not sure about button name)


OBSERVED RESULT
A new keyframe is created, but with wrong value (not related to zoom here!)



EXPECTED RESULT
When inserting a new keyframe, properties have to be properly interpolated (like it is when insertion is made through transform tool)



SOFTWARE/OS VERSIONS
krita-5.0.0-prealpha-4c233e3-x86_64.appimage
Comment 1 Ahab Greybeard 2021-06-22 08:29:29 UTC
I can confirm this for the Jun 21 5.0.0-prealpha (git 778ddae) appimage on Debian 10.

The new keyframe has a value that is forced to the initial parameter value, whatever that may be, not a properly interpolated value on the existing curve.
If the user has set up several parameter curves than this is very inconvenient because they all then have to be manually 'corrected'.
Comment 2 Eoin O'Neill 2021-06-24 02:26:03 UTC
*** Bug 438342 has been marked as a duplicate of this bug. ***
Comment 3 Eoin O'Neill 2021-07-08 21:15:23 UTC
Git commit e29bc450163151a57a20fa3b245693a2cd9618ec by Eoin O'Neill.
Committed on 08/07/2021 at 21:14.
Pushed by eoinoneill into branch 'master'.

New scalar keyframes between two keyframes should now self assign to interpolated value.

More work can be done here in the future for getting proper interpolation "handles" based on the previous
key's interpolation handle data -- but that will require more work. For now, it at least adds the key to
the correct value instead of duplicating last keys value.

M  +2    -2    plugins/dockers/animation/KisAnimCurvesDocker.cpp
M  +9    -1    plugins/dockers/animation/KisAnimUtils.cpp

https://invent.kde.org/graphics/krita/commit/e29bc450163151a57a20fa3b245693a2cd9618ec
Comment 4 grum999 2021-07-09 18:39:40 UTC
Hi



When I click on button, Krita crash (krita-5.0.0-prealpha-13f04ca-x86_64.appimage) with message:

ASSERT (krita): "hash != KeyTraits::NullHash" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/image/3rdparty/lock_free_map/leapfrog.h, line 161


Not sure about origin of problem (this commit or stuff made by Dmitry about memory?) but as it crash I reopen bug
More information here:
https://krita-artists.org/t/krita-slowing-down-as-time-passes-after-upgrading-to-4-4-5/25443/34?u=grum999



Grum999
Comment 5 Eoin O'Neill 2021-07-13 02:17:54 UTC
Grumm,

Is this happening on that same test file provided on one of your other bug reports? Or is this a new file where this issue is happening.

FWIW my change should not be affecting memory in any major way, but I will investigate some of the commits between the revisions you've mentioned and see if I can isolate a cause.
Comment 6 grum999 2021-07-26 17:52:38 UTC
Hi


Just test last available appimage (krita-5.0.0-prealpha-627782b-x86_64.appimage) and for me it's ok:
- Original problem (wrong values) is fixed
- No more crash when "insert button" is clicked

Also I can confirm this fix the https://bugs.kde.org/show_bug.cgi?id=438342


I change bug to RESOLVED/FIXED


Grum999