Bone layers/groups from 3.6 get lost after save/reload when linked/saved in 4.0 #111776

Closed
opened 2023-09-01 09:51:02 +02:00 by Philipp Oeser · 5 comments
Member

System Information
Operating system: Linux-6.4.12-200.fc38.x86_64-x86_64-with-glibc2.37 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 535.98

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-01 06:09, hash: cc5dd9e3d39c
Worked: --

Short description of error
Bone layers/groups from 3.6 get lost after save/reload when linked/saved in 4.0

Exact steps for others to reproduce the error
In current main, from a default startup:

  • link object "Armature" from lib_saved_in_3.6.2.blend
  • observe bone layers and bone groups get correctly brought over to / displayed as bone collections
  • save this file in current main and reload
  • bone collections are gone
**System Information** Operating system: Linux-6.4.12-200.fc38.x86_64-x86_64-with-glibc2.37 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 535.98 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-01 06:09, hash: `cc5dd9e3d39c` Worked: -- **Short description of error** Bone layers/groups from 3.6 get lost after save/reload when linked/saved in 4.0 **Exact steps for others to reproduce the error** In current main, from a default startup: - link object "Armature" from `lib_saved_in_3.6.2.blend` - observe bone layers and bone groups get correctly brought over to / displayed as bone collections - save this file in current main and reload - bone collections are gone
Philipp Oeser added the
Type
Report
Module
Animation & Rigging
Status
Confirmed
Priority
High
labels 2023-09-01 09:51:32 +02:00
Author
Member

Suspicion is that doing !DNA_struct_elem_find(fd->filesdna, in do_versions_after_linking is not "safe"

  • when coming here after actually linking (File > Link), the FileData and Main actually match (both refer to 3.6)
  • when opening the saved file FileData and Main dont match (we can come here with the FileData of 4.0 and Main of 3.6
  • so this is why version_bonegroup_migrate_color, version_bonelayers_to_bonecollections, version_bonegroups_to_bonecollections are skipped for the 3.6 data
Suspicion is that doing `!DNA_struct_elem_find(fd->filesdna,` in `do_versions_after_linking` is not "safe" - when coming here after actually linking (File > Link), the `FileData` and `Main` actually match (both refer to 3.6) - when opening the saved file `FileData` and `Main` dont match (we can come here with the `FileData` of 4.0 and `Main` of 3.6 - so this is why `version_bonegroup_migrate_color`, `version_bonelayers_to_bonecollections`, `version_bonegroups_to_bonecollections` are skipped for the 3.6 data
Philipp Oeser added the
Interest
Core
label 2023-09-01 10:47:15 +02:00
Member

This sounds like something @Hjalti and I discovered the other day, but hadn't gotten around to filing an issue about yet. Basically, if you have scene file A and rig file B, both created in 3.6.x, with an armature from file B linked in file A, then when opening file A in 4.0 the linked armature doesn't have bone collections or colors. You have to open and re-save file B to get the layers and groups converted, to then show up in file A.

With this report, it appears that this happens even if scene file A is created in 4.0 with bone collections support. The initial linking seems to work, but still results in the same behavior after closing and re-opening the file.

This sounds like something @Hjalti and I discovered the other day, but hadn't gotten around to filing an issue about yet. Basically, if you have scene file A and rig file B, both created in 3.6.x, with an armature from file B linked in file A, then when opening file A in 4.0 the linked armature doesn't have bone collections or colors. You have to open and re-save file B to get the layers and groups converted, to then show up in file A. With this report, it appears that this happens even if scene file A is created in 4.0 with bone collections support. The *initial* linking seems to work, but still results in the same behavior after closing and re-opening the file.

another issue that might be related: when linking in the Armature itself (as in not the object containing the armature) the collections also don't appear

another issue that might be related: when linking in the Armature itself (as in not the object containing the armature) the collections also don't appear

This is indeed an issue with generic readfile code, in do_version_after_liblink the filedata is always the main file one currently.

This is trivial to fix, but uncovers several other cans of worms on the way unfortunately

This is indeed an issue with generic readfile code, in do_version_after_liblink the filedata is always the main file one currently. This is trivial to fix, but uncovers several other cans of worms on the way unfortunately

@mont29 what is involved in that fix and what are the cans of worms on the way
Is that a known issue? The !DNA_struct_elem_find logic is used throughout the versioning code so I'd expect them all to have the same behavior

@mont29 what is involved in that fix and what are the cans of worms on the way Is that a known issue? The `!DNA_struct_elem_find` logic is used throughout the versioning code so I'd expect them all to have the same behavior
Christoph Lendenfeld self-assigned this 2023-09-01 16:45:15 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-09-01 19:13:46 +02:00
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
4 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#111776
No description provided.