Fix #120447: Anim/Drivers on Bone Collections created in 4.0 break in 4.1 #120514

Manually merged
Sybren A. Stüvel merged 1 commits from dr.sybren/blender:pr/fix-120447-bonecoll-anim-drivers into main 2024-04-11 15:34:39 +02:00

Use versioning code to change Drivers & F-Curves targeting armature.collections[... to target armature.collections_all[... instead. The former contains the root collections only, whereas the latter contains all of them in a flat list. Not only does this fix the tree view (it binds to properties via the .collections_all RNA path), but also this makes the drivers & animation of the properties work even when the hierarchy changes.

Note that both .collections and .collections_all give access to all bone collections. The former just requires iterating hierarchically, that is, via some_collection.children.


I'm including @ThomasDinges as reviewer as this PR targets the 4.1.1 corrective release, and adds versioning code. This means that it likely cannot be cherry-picked as-is, and thus I'd like his view on this before landing in main.

I've attached two blend files, one created with Blender 4.0, the other with 4.1 so that it can target the 'solo' property as well.

  • 4.0 file: two collections, one with a driven visibility and the other an animated visibility.
  • 4.1 file: four collections, same as above + similar for the 'solo' property.
Use versioning code to change Drivers & F-Curves targeting `armature.collections[...` to target `armature.collections_all[...` instead. The former contains the root collections only, whereas the latter contains all of them in a flat list. Not only does this fix the tree view (it binds to properties via the `.collections_all` RNA path), but also this makes the drivers & animation of the properties work even when the hierarchy changes. Note that both `.collections` and `.collections_all` give access to all bone collections. The former just requires iterating hierarchically, that is, via `some_collection.children`. --------- I'm including @ThomasDinges as reviewer as this PR targets the 4.1.1 corrective release, and adds versioning code. This means that it likely cannot be cherry-picked as-is, and thus I'd like his view on this before landing in `main`. I've attached two blend files, one created with Blender 4.0, the other with 4.1 so that it can target the 'solo' property as well. - **4.0 file:** two collections, one with a driven visibility and the other an animated visibility. - **4.1 file:** four collections, same as above + similar for the 'solo' property.
Sybren A. Stüvel added this to the 4.1 milestone 2024-04-11 12:17:11 +02:00
Sybren A. Stüvel added the
Module
Animation & Rigging
label 2024-04-11 12:17:11 +02:00
Sybren A. Stüvel added 1 commit 2024-04-11 12:17:20 +02:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
60e30dc1f0
Fix #120447: Anim/Drivers on Bone Collections created in 4.0 break in 4.1
Use versioning code to change Drivers & F-Curves targeting `armature.
collections[...` to target `armature.collections_all[...` instead. The
former contains the root collections only, whereas the latter contains
all of them in a flat list.

Note that both `.collections` and `.collections_all` give access to all
bone collections. The former just requires iterating hierarchically, that
is, via `some_collection.children`.
Sybren A. Stüvel requested review from Nathan Vegdahl 2024-04-11 12:19:13 +02:00
Sybren A. Stüvel requested review from Thomas Dinges 2024-04-11 12:19:13 +02:00
Sybren A. Stüvel requested review from Christoph Lendenfeld 2024-04-11 12:19:37 +02:00
Author
Member

@blender-bot build

@blender-bot build
Sybren A. Stüvel added the
Priority
High
label 2024-04-11 12:39:24 +02:00
Christoph Lendenfeld approved these changes 2024-04-11 12:49:37 +02:00
Christoph Lendenfeld left a comment
Member

lgtm!

lgtm!
Nathan Vegdahl approved these changes 2024-04-11 12:58:36 +02:00
Nathan Vegdahl left a comment
Member

Looks good to me. Also tested with the provided test files, and the paths indeed appear to get updated as expected.

Looks good to me. Also tested with the provided test files, and the paths indeed appear to get updated as expected.

LGTM for main. For 4.1, easiest to create a second PR with corresponding versioning code. You can land it directly in 4.1 then if you like.

LGTM for main. For 4.1, easiest to create a second PR with corresponding versioning code. You can land it directly in 4.1 then if you like.
Thomas Dinges approved these changes 2024-04-11 13:44:16 +02:00
Sybren A. Stüvel manually merged commit ded8c5d6e6 into main 2024-04-11 15:34:39 +02:00
Sybren A. Stüvel deleted branch pr/fix-120447-bonecoll-anim-drivers 2024-04-11 15:36:08 +02:00
Author
Member

I also committed this PR on the blender-v4.1-release branch as 91294ccd5a

I also committed this PR on the `blender-v4.1-release` branch as 91294ccd5ab5ec66954d01732f49bac9bddc3239
First-time contributor

I also committed this PR on the blender-v4.1-release branch as 91294ccd5a

Thank you so much for fixing this for 4.1! Any ideas of when to expect the patched version to be available on Steam?

> I also committed this PR on the `blender-v4.1-release` branch as 91294ccd5ab5ec66954d01732f49bac9bddc3239 Thank you so much for fixing this for 4.1! Any ideas of when to expect the patched version to be available on Steam?

It's planned for the 16th of April.

It's planned for the 16th of April.
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
5 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#120514
No description provided.