Page MenuHome

Incorrect pasting of F-Curves in graph editor
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-8.1-6.3.9600 64 Bits
Graphics card: GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.35

Blender Version
Broken: version: 2.80 (sub 58), branch: master, commit date: 2019-04-23 09:24, hash: rBc9ed39925a51
Worked: (optional)

Short description of error
Incorrect pasting of F-Curves in graph editor while you trying to copy paste F-Curve e.g. from Rot Y channel of one bone to Rot Z(X) or Loc Z(X) channel of another Bone. You get flat f-curve as result (you have to scale up to 10 000 000 to get source values even if you copy Rot to Rot), or incomplete (half of source f-curve pasted)

Exact steps for others to reproduce the error
Here is example. Default rigify metarig.

  1. Copy Rot Y F-Curve from Spine.001 (yellow circle) and paste it to other bones channel (correct pasting to Rot Y (Loc Y) of other bones only)

Option A. Paste it to Rot X of upper_arm.L (red circle) As result you get flat F-Curve, but if you scale it Y up to 10 000 000 you see that it paste half of source f-curve with incorrect values

Option B. Paste it to Loc Z of spine (blue star) you get flat curve but if you scale it Y up to 1 000 000 it looks correct, meanwhile if you paste it to Loc Y you get correct result immediately

Event Timeline

I would set that to high priority bug at least among animation tasks, because this is a fundamental workflow in graph editor

Alexander Gavrilov (angavrilov) closed this task as Invalid.EditedMay 1 2019, 4:04 PM

Your file has keyframes in all three curves selected (check Dope Sheet), so Copy stores all three curves, and subsequently Paste selects keys from the appropriate X, Y or Z curve. If you deselect all with A and then select only the Y curve before Copy, everything works as you'd expect. I.e. to paste from arbitrary curve to arbitrary curve, you must ensure that only one curve is selected both during Copy and Paste.

Possibly you could argue that Copy should take into account which curves are selected in the Graph editor (like Paste does), instead of just keyframes, but this is a UI design issue, not a bug as such.

Your file has keyframes in all three curves selected (check Dope Sheet), so Copy stores all three curves, and subsequently Paste selects keys from the appropriate X, Y or Z curve. If you deselect all with A and then select only the Y curve before Copy, everything works as you'd expect. I.e. to paste from arbitrary curve to arbitrary curve, you must ensure that only one curve is selected both during Copy and Paste.

weird.. cause I select Rot Y only channel for copy.. here is a gif -


and why paste to Loc Y and Loc Z (option B) has different scale?

Selecting channels doesn't matter for Copy, only selecting keyframes themselves. View -> Only Selected Curve Keyframes makes this confusing, but it's off by default. Maybe when that option is enabled, Copy should also only use selected curves.

Changing this is a one-line fix, but I'm not sure nobody would complain if it were changed to be the other way. As I said, this is completely a UI design issue.

Selecting channels doesn't matter for Copy, only selecting keyframes themselves. View -> Only Selected Curve Keyframes makes this confusing, but it's off by default. Maybe when that option is enabled, Copy should also only use selected curves.
Changing this is a one-line fix, but I'm not sure nobody would complain if it were changed to be the other way. As I said, this is completely a UI design issue.

oh, indeed, it does work with only selected keyframes disabled. But if it is enabled and doesn't work same way is not it a bug? Is it still UI issue? Maybe then this task should be converted in TO DO task or something?

@Alexander Gavrilov (angavrilov) I agree with @Stanislav Ovcharov (Stan1) that the current behaviour is rather strange. I haven't tried this myself, but copying a nice curvy curve and seeing that the result of pasting is a almost completely flattened curve would make my scratch my head. Who would see this as desirable behaviour?

The "flattened" thing is completely misleading: it is actually copying the X and Z curves of the original bone, which contain not-quite-zero values, likely due to numeric precision limitations in matrix operations of transform tools.

I didn't get. what the problem with copy keyframes since the fix was made.. seems it copy paste as usual.. I can copy paste them in graf editor or dopeshit and it doesn't matter channel selected or not. here is a gif -


and it doesn't matter that only selected curve keyframes on or off

When "Only Selected Curve Keyframes" is enabled, it must work like this, because otherwise it is very confusing, as shown by the bug report.
Then, the next question is whether display options should affect the behavior of operations. If not, then it has to always work like in this commit...

I think the basis of the discussion should be that it should be clear what exactly you're copying. @Stanislav Ovcharov (Stan1) describes (in the task) that copying the Y-channel and pasting onto the Z-channel doesn't properly work. @Alexander Gavrilov (angavrilov) if you found out that he was actually not copying the Y-channel at all, then the bug is indeed in understanding the UI (and not in the paste behaviour, as I initially thought).

View -> Only Selected Curve Keyframes makes this confusing, but it's off by default. Maybe when that option is enabled, Copy should also only use selected curves.

To me copying stuff that is hidden makes no sense, so I would say that display options should affect the behaviour of operations, so I definitely agree with this.

When "View -> Only Selected Curve Keyframes" is false, I feel that "Copy Keyframes" should just copy the selected keyframes whether they belong to a selected channel or not, simply because that follows the name of the operator.

Basically, if you are pasting multiple curves, Paste does some magic to match up channels by property name and coordinate axis. This allows you to safely copy & paste all transform curves at once, but if you want to copy & paste between arbitrary channels, you must ensure you only copy one curve, and paste into one channel. Here keys in all 3 channels were selected, but it was not visible to the user due to "Show Selected". The clipboard thus ended up containing all 3 curves, and Paste applied the axis matching logic.

Here keys in all 3 channels were selected, but it was not visible to the user due to "Show Selected"

Yeah, that's what's really confusing. Can we treat such keys as "unselected" in the copy logic?

Well, there is a common workflow in "hi-end", (Disney, Sony studios) animation. To get physically correct and appeal animation you sometimes copy curves from e.g. master_control to many other bones, face bones, arm bones, e.g. from location to rotation and location, depends on specific situation. Obviously you need to copy only one specific curve at once and paste it into specific curve. Previous behavior was unhandy enough, graph editor was too messy because of other curves\keyframes visible.

I agreed that copy hidden stuff makes almost no sense because if you want to get appeal animation you have to keep all your curves clean as possible and you should know what every keyframe for in its place. And if u get some unexpected 'hidden' keyframes you can spend enough time to find out why your animation for example has some new pops