Bug 413968 - Transform showing original position (first frame) and not last frame for movement
Summary: Transform showing original position (first frame) and not last frame for move...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: 4.2.7.1
Platform: Microsoft Windows Other
: NOR normal
Target Milestone: ---
Assignee: Emmet O'Neill
URL:
Keywords: regression
: 427215 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-09 10:52 UTC by mx3307
Modified: 2020-12-15 00:01 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test file to reproduce the bug (239.82 KB, application/zip)
2020-12-14 15:43 UTC, animtim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mx3307 2019-11-09 10:52:18 UTC
SUMMARY

I am creating an animation in Krita but I have realized an issue and I have no idea how to solve it. I would appreciate any help!

I have my starting frame, where the character is still, and I have created my last frame, where my character is jumping in a certain position.

Now I am starting to create the "middle frames". I activated the onion skin. Whenever I use the transform tool to move anything, when I select it, it will show the first frame's image. I mean, the selection is the object in that frame, but it will show the first frame's image.

For example, if I select my head, and I am in my last frame, I will see the image of the first frame, not the last frame.

This makes it really hard to position things since it is not clear where every object is.

With onion Skin off it is the same. With onion skin on this problem extends to the onion skin images, the onion skin highlights starts appearing everywhere (makes no sense at all).

Start:

https://imgur.com/GMda2tv

End (last frame):

https://imgur.com/YDaePOZ

Middle with Onion On:

https://imgur.com/znYzEwL

Looks Like Start With Onion On, but it is actually End Frame, Onion On, and the head layer selected with transform tool:

https://imgur.com/tLaV8qY

End With Onion On:

https://imgur.com/oDbdWf4

Using Transform In last Frame with Onion On:

https://imgur.com/Q7YtaUq

STEPS TO REPRODUCE
1. You can activate or not onion skin in animation. Create a starting frame.
2. Move any quantity of frames forward, and select the same layer to transform (ex. animation of moving a leg forward).
3. Notice that after moving the layer, if you select the layer again, it will show the image of the first frame, even though if you move it, it will move the image of the last frame. (But you won't actually know if you moved it correctly because you can't see the image).
4. If you go to a frame between those frames and try to move it, you will see that it will show the onion skin moving too, though it does not really move the onion skin.

OBSERVED RESULT

It shows the image of first frame. Onion skin moves with everything, but the image in the last frame or first frame does not actually move (it acts correctly, but what it displays is incorrect).


EXPECTED RESULT

It should display the image of the selected layer, and onion skin should stay still, since we are not moving the first or last frame, and also when it is modified it does not move them either.

SOFTWARE/OS VERSIONS
Windows: windows 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Krita is great
Comment 1 Ahab Greybeard 2019-11-10 09:06:31 UTC
Looking at your attached screenshots, you always have the Group layer selected as the active layer.

It is the case that if you do this then a Transform action will take all the layers in the group and act on the first frame contents and also produce a separate set of onion skins that overlay the 'normal' onion skins - which is confusing.

It may be that the Transform tool is not intended to be used in this way for animations. That would need comment from a developer.

You can use the Transform tool on individual selected layers and frames with no problem. You select the layer by clicking on the layer name, not a frame in the timeline.

If you want to simply move a group of animated layers then the Move tool works fine with the Group layer as the selected layer.

Setting to Confirmed because this does happen and causes confusion/problems.
Comment 2 electronicbeats4music 2020-03-30 10:43:25 UTC
(In reply to mx3307 from comment #0)
> SUMMARY
> 
> I am creating an animation in Krita but I have realized an issue and I have
> no idea how to solve it. I would appreciate any help!
> 
> I have my starting frame, where the character is still, and I have created
> my last frame, where my character is jumping in a certain position.
> 
> Now I am starting to create the "middle frames". I activated the onion skin.
> Whenever I use the transform tool to move anything, when I select it, it
> will show the first frame's image. I mean, the selection is the object in
> that frame, but it will show the first frame's image.
> 
> For example, if I select my head, and I am in my last frame, I will see the
> image of the first frame, not the last frame.
> 
> This makes it really hard to position things since it is not clear where
> every object is.
> 
> With onion Skin off it is the same. With onion skin on this problem extends
> to the onion skin images, the onion skin highlights starts appearing
> everywhere (makes no sense at all).
> 
> Start:
> 
> https://imgur.com/GMda2tv
> 
> End (last frame):
> 
> https://imgur.com/YDaePOZ
> 
> Middle with Onion On:
> 
> https://imgur.com/znYzEwL
> 
> Looks Like Start With Onion On, but it is actually End Frame, Onion On, and
> the head layer selected with transform tool:
> 
> https://imgur.com/tLaV8qY
> 
> End With Onion On:
> 
> https://imgur.com/oDbdWf4
> 
> Using Transform In last Frame with Onion On:
> 
> https://imgur.com/Q7YtaUq
> 
> STEPS TO REPRODUCE
> 1. You can activate or not onion skin in animation. Create a starting frame.
> 2. Move any quantity of frames forward, and select the same layer to
> transform (ex. animation of moving a leg forward).
> 3. Notice that after moving the layer, if you select the layer again, it
> will show the image of the first frame, even though if you move it, it will
> move the image of the last frame. (But you won't actually know if you moved
> it correctly because you can't see the image).
> 4. If you go to a frame between those frames and try to move it, you will
> see that it will show the onion skin moving too, though it does not really
> move the onion skin.
> 
> OBSERVED RESULT
> 
> It shows the image of first frame. Onion skin moves with everything, but the
> image in the last frame or first frame does not actually move (it acts
> correctly, but what it displays is incorrect).
> 
> 
> EXPECTED RESULT
> 
> It should display the image of the selected layer, and onion skin should
> stay still, since we are not moving the first or last frame, and also when
> it is modified it does not move them either.
> 
> SOFTWARE/OS VERSIONS
> Windows: windows 10
> macOS: 
> Linux/KDE Plasma: 
> (available in About System)
> KDE Plasma Version: 
> KDE Frameworks Version: 
> Qt Version: 
> 
> ADDITIONAL INFORMATION
> 
> Krita is great

I am having the same problem currently, will get back to you if I can find a fix!
Comment 3 animtim 2020-12-14 15:43:31 UTC
Created attachment 134073 [details]
test file to reproduce the bug

extract the zip and apply the steps explained in the comment to reproduce the bug.
Comment 4 animtim 2020-12-14 15:45:29 UTC
Hi,

I confirm this is a regression, I just noticed it with a student hitting this bug.

It worked properly at least until Krita 4.1.3, and it is broken at least since 4.2.9 (I don't have other appimages on my computer to check inbetween versions).

I also tested on latest stable appimage and alpha nightly build (krita-4.4.3-alpha-2db646c-x86_64.appimage) and the issue is still there.

I just attached a simple test file to reproduce: open it, select layer "group1", go to frame 4 and select the transform tool. You can see that the preview uses the image from frame 0 instead of current content.

Note that if you do a transform and apply it, the result is correct, only the preview content is not good.

Let me know if you need more details.
Comment 5 Halla Rempt 2020-12-14 15:46:27 UTC
I'll mark it as a regression. Is it also broken in the nightly unstable builds?
Comment 6 animtim 2020-12-14 15:54:57 UTC
*** Bug 427215 has been marked as a duplicate of this bug. ***
Comment 7 animtim 2020-12-14 16:02:44 UTC
Yes, still reproducible on krita-5.0.0-prealpha-0b88c9b-x86_64.appimage.
Comment 8 Emmet O'Neill 2020-12-14 20:58:37 UTC
Git commit 014fd3a1b7e8394dc7d64cdc8d556ea9c058a0fb by Emmet O'Neill.
Committed on 14/12/2020 at 20:57.
Pushed by emmetoneill into branch 'master'.

Fix group layer transformation preview showing wrong frame.

M  +1    -1    libs/image/kis_image.cc
M  +1    -0    libs/image/kis_image_animation_interface.h
M  +1    -1    libs/image/kis_keyframe_channel.cpp
M  +0    -1    plugins/tools/tool_transform2/kis_tool_transform.cc
M  +7    -0    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/graphics/krita/commit/014fd3a1b7e8394dc7d64cdc8d556ea9c058a0fb
Comment 9 Emmet O'Neill 2020-12-14 21:03:40 UTC
This should solve it. The Transform Tool's preview generation wasn't properly taking the current animation frame into account.

Thank you all for the detailed bug report, confirmations and test file. :)
Comment 10 Halla Rempt 2020-12-14 21:04:55 UTC
Don't forget to backport to 4.3 and 4.4.2 :-)
Comment 11 animtim 2020-12-14 21:16:56 UTC
Thank you again for the fast fix !
Looking forward to the next stable nightly build :D
Comment 12 Emmet O'Neill 2020-12-14 23:53:41 UTC
Git commit 9cfbd9dc45fb1e085002fd2df77bf11082f36291 by Emmet O'Neill.
Committed on 14/12/2020 at 23:53.
Pushed by emmetoneill into branch 'krita/4.4.2'.

Fix group layer transformation preview showing wrong frame.

(cherry picked from commit 014fd3a1b7e8394dc7d64cdc8d556ea9c058a0fb)

M  +1    -1    libs/image/kis_image.cc
M  +1    -0    libs/image/kis_image_animation_interface.h
M  +0    -1    plugins/tools/tool_transform2/kis_tool_transform.cc
M  +7    -0    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/graphics/krita/commit/9cfbd9dc45fb1e085002fd2df77bf11082f36291
Comment 13 Emmet O'Neill 2020-12-15 00:01:14 UTC
Git commit c86a9b5f195e2f51ec196f426fc3db0d2b1e6323 by Emmet O'Neill.
Committed on 14/12/2020 at 23:54.
Pushed by emmetoneill into branch 'krita/4.3'.

Fix group layer transformation preview showing wrong frame.

(cherry picked from commit 014fd3a1b7e8394dc7d64cdc8d556ea9c058a0fb)

M  +1    -1    libs/image/kis_image.cc
M  +1    -0    libs/image/kis_image_animation_interface.h
M  +0    -1    plugins/tools/tool_transform2/kis_tool_transform.cc
M  +7    -0    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/graphics/krita/commit/c86a9b5f195e2f51ec196f426fc3db0d2b1e6323