Page MenuHome

Animating modifier expandability no longer working
Confirmed, LowPublicKNOWN ISSUE


System Information
Operating system: Windows 7
GPU: Radeon Vega 64
GPU Software Version: 20.4.2 (2020.0515.1537.28108)
CPU: Intel Core i7-5960X

Blender Version(s)
(listed are versions tested)

Working: 2.79 (sub 00), branch: master, commit date: 2018-03-22 14:10, hash: f4dc9f9d68b, type: Release, build date: 2018-03-22, 09:59 AM
Working: blender-2.90.0-2e52b3206cc6-windows64
Broken: blender-2.90.0-b74cc23dc478-windows64

I assume is the culprit: rB9b099c86123fc828a194c59ce5b8bbf5a56f9cdb

Short description of error

Animating the expandability of modifiers doesn't work in the listed broken version(s) anymore.
It's useful to "group" them for different frame ranges, as not all of them are usually needed at one time, this helps keep a tidy UI when they're not actively in use.

Exact steps for others to reproduce the error from scratch

  • Open working version
  • Add modifiers
  • Key the Expanded toggle
  • Open in broken version
  • No animation

I didn't read any discussion in the Differentials about the intentional removal of this, so I assume this is a bug.

Event Timeline

Well, I can't read

Sybren A. Stüvel (sybren) changed the task status from Needs Triage to Confirmed.Jun 8 2020, 4:04 PM

This seems to be only partially related to animation, as this also doesn't work:

  • Add a cube
  • Add a Bevel modifier
  • Run this code line-for-line in the Python console:
>>> C.object.modifiers["Bevel"].show_expanded = True
>>> C.object.modifiers["Bevel"].show_expanded = False
>>> C.object.modifiers["Bevel"].show_expanded = True

However, that also didn't work before rB9b099c86123fc828a194c59ce5b8bbf5a56f9cdb. I can confirm that animating the property did work before that commit, and no longer after it, though.

Sybren A. Stüvel (sybren) changed the subtype of this task from "Report" to "Bug".Jun 8 2020, 4:04 PM
Sybren A. Stüvel (sybren) moved this task from Backlog to Bugs on the Animation & Rigging board.
Sybren A. Stüvel (sybren) renamed this task from Animating expandability no longer working to Animating modifier expandability no longer working.Jun 8 2020, 4:07 PM
Sybren A. Stüvel (sybren) claimed this task.

This diff fixes the Python issue I described above, at least for Blender before rB9b099c86123fc828a194c59ce5b8bbf5a56f9cdb. After that it still doesn't work, both for animation & setting directly in Python. @Hans Goudey (HooglyBoogly) can you take a look?

diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index a0026797c68..92eec6190da 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -6877,6 +6877,7 @@ void RNA_def_modifier(BlenderRNA *brna)
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
   RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
+  RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, NULL);
   prop = RNA_def_property(srna, "use_apply_on_spline", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_ApplyOnSpline);

@Sybren A. Stüvel (sybren) Thanks for looking into this. I have a hunch why expansion animating isn't working after the patch. The UI's "get expansion" callback should happen before "set expansion." It's probably backwards now.

Hans Goudey (HooglyBoogly) triaged this task as Low priority.Jun 9 2020, 7:23 PM
Hans Goudey (HooglyBoogly) changed the subtype of this task from "Bug" to "Known Issue".

This is a downside of using the regular panel-expansion arrows for expanding the modifier layouts.

I have a fix for setting the expansion with python, but I'm not sure keyframing will work without larger work. Maybe a refactor tying panel expansion to an RNA property, or a hacky way to redirect "i" keyframing there to some property.

Neither option seems particularly good though, so I think I have to classify this as a known issue.

I talked with @Julian Eisel (Severin) about this too. The fact that this worked in the first place wasn't exactly intended. The modifier expansion is UI data, so animating it already brings us into gray area.

The fix I'll commit later should fix replaying existing modifier expansion "animations," but keyframing new ones won't be possible in the UI. A work-around for that is keyframing in python: C.active_object.modifiers[0].keyframe_insert(data_path="show_expanded")