Maniphest T93776

Channels with F-Curve modifiers persist after their all keyframes are deleted
Closed, ArchivedDESIGN

Assigned To
None
Authored By
Sam Brubaker (rocketman)
Dec 6 2021, 11:20 PM
Tags
  • BF Blender
  • Animation & Rigging
Subscribers
Philipp Oeser (lichtwerk)
Sam Brubaker (rocketman)

Description

System Information
Operating system: Linux 64-bit
Graphics card: GTX 1080 ti

Blender Version
Broken: 2.93.6 and 3.0

Short description of error
When all the keyframes in an animation channel are deleted, that channel will be automatically deleted as well.
However, if the channel has an F-Curve modifier, it will fail to be deleted. This creates a channel with no F-Curve or keyframes, which should not be possible. The animated property will still be highlighted green as though it were animated, and its value will be stuck on zero. This is the only use case I know of where the user must specifically delete the channels and not all the keyframes as usual


Exact steps for others to reproduce the error

  1. Open the example file (an "animation" with F-Curve modifiers)
  2. Select all the keyframes and delete them

Related Objects

Mentioned Here
rBf71376103908: Keyframing Operators: Improved Error Messages
P2652 T93776_envelope_limits

Event Timeline

Sam Brubaker (rocketman) created this task.Dec 6 2021, 11:20 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Dec 8 2021, 6:00 PM
Philipp Oeser (lichtwerk) claimed this task.
Philipp Oeser (lichtwerk) added a project: Animation & Rigging.
Philipp Oeser (lichtwerk) changed the task status from Confirmed to Needs Information from Developers.Dec 9 2021, 10:36 AM
Philipp Oeser (lichtwerk) removed Philipp Oeser (lichtwerk) as the assignee of this task.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Design".
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

This creates a channel with no F-Curve or keyframes, which should not be possible

Well, hm, not sure anymore.
An action can have an fcurve/channel without keyframes.
The following will also result this:

C.active_object.animation_data.action.fcurves.new("scale", index=1)

And putting an FModifier on it seems perfectly valid (Generator or Built-In Function for example - since these dont rely on keyframes at all - see below also [when does an FModifier still display keyframes?]).

The animated property will still be highlighted green as though it were animated, and its value will be stuck on zero

Well, it is still animated, in your example, this is only stuck to the default value of zero since the FModifier is of type Stepped Interpolation.

Taking a step back, some FModifiers will hide the keyframes right away (so you dont even have a chance to delete them), so my thinking was: "maybe, when deleting the last keyframe, we should remove the FModifier as well [just for the ones that actually display the keyframes]":

  • Generator (if it is not "additive")
  • Built-In Function (if it is not "additive")
  • Envelope
  • Limits

Some keep the keyframes visible:

  • Cycles
  • Noise
  • Stepped Interpolation

This is controlled by BKE_fcurve_are_keyframes_usable.
Note here:

  • I am not sure if the choice of hiding keyframes for Envelope & Limits is wise? (seems to have been implemented in rBf71376103908: Keyframing Operators: Improved Error Messages as a bugfix for keyframing curves with a Generator FModifier)
    • having an Envelope on an FCurve seems like I would still want to see the keyframes (and edit them), dont think the FModifier is really "harmful - cannot allow" as stated in BKE_fcurve_are_keyframes_usable
    • of course with Limits you can run into the situation that keyframes will have no effect, dont think this is harmful as well though...
  • we should really have the envelope points editable right on the canvas at some point :)

To sum it up:

  • think we should look into displaying keyframes for Envelope & Limits as well (though a bit OT), see P2652 for a quick hack
  • the report is more of a design question:
    • is it likely to delete the last keyframe, but want to keep the modifiers? (I am leaning towards this, so no bug and not even a TODO, keep as is)
      • I can think of a situation were you set a nice modifier stack but still want to start the keyframe animation from scratch
    • or is it more likely that when deleting the last keyframe, you always intend to have no animation at all anymore?
Philipp Oeser (lichtwerk) closed this task as Archived.Dec 10 2021, 1:07 PM

FYI, this has been discussed in the Animation & Rigging meeting https://devtalk.blender.org/t/2021-12-09-animation-rigging-module-meeting/21758

T93776: Channels with F-Curve modifiers persist after their all keyframes are deleted

Decision needs to be made about functionality of deleting keyframes.
Jason: good to keep around as-is.
Paolo: would be consistent with mesh + modifiers, when deleting all vertices.
Sybren: deleting an FCurve can already be done by clicking on its label and pressing X.
Decided to keep FCurves (when deleting its keyframes but modifiers are still there).

So decision was to keep current behavior, will close this report then, thx reporting anyways!