Animating modifier expandability no longer working #77502

Closed
opened 2020-06-06 12:19:17 +02:00 by ChristopherAnderssarian · 11 comments

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
through
Working: blender-2.90.0-2e52b3206cc6-windows64
Broken: blender-2.90.0-b74cc23dc478-windows64

I assume is the culprit: 9b099c8612

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.

**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` *through* Working: `blender-2.90.0-2e52b3206cc6-windows64` Broken: ` blender-2.90.0-b74cc23dc478-windows64` I assume is the culprit: 9b099c8612 **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.
Added subscribers: @ChristopherAnderssarian, @HooglyBoogly

Well, I can't read

Well, I can't read

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

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 9b099c8612. I can confirm that animating the property did work before that commit, and no longer after it, though.

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 9b099c8612. I can confirm that animating the property did work before that commit, and no longer after it, though.
Sybren A. Stüvel self-assigned this 2020-06-08 16:07:42 +02:00
Sybren A. Stüvel changed title from Animating expandability no longer working to Animating modifier expandability no longer working 2020-06-08 16:09:13 +02:00
Sybren A. Stüvel removed their assignment 2020-06-08 16:16:11 +02:00

This diff fixes the Python issue I described above, at least for Blender before 9b099c8612. After that it still doesn't work, both for animation & setting directly in Python. @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);
This diff fixes the Python issue I described above, at least for Blender before 9b099c8612. After that it still doesn't work, both for animation & setting directly in Python. @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); ```
Hans Goudey self-assigned this 2020-06-08 19:11:19 +02:00
Member

@dr.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.

@dr.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.
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

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 @JulianEisel 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- [x].keyframe_insert(data_path="show_expanded")

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 @JulianEisel 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- [x].keyframe_insert(data_path="show_expanded")`
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:36:12 +01:00
Member

Not sure there's any reason to keep this open anymore. Animating UI data is generally not expected to work.

Not sure there's any reason to keep this open anymore. Animating UI data is generally not expected to work.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-02-09 22:48:04 +01:00

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.

For the record, I agree with this.

> 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. For the record, I agree with this.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#77502
No description provided.