Severe problem with relocating linked libraries #51902

Closed
opened 2017-06-26 15:52:19 +02:00 by Steffen Dünner · 8 comments

System Information
Win10 x64, nVidia GTX 780 3GB

Blender Version
Broken: Official 2.78c, all current builds
Worked: (optional)

(Not so) Short description of error
This one is either a complete misunderstanding of the concept of linked libraries on my side or a real bug, but either way it's a workflow and project killer lurking in the dark that should be taken care of ASAP. It can easily kill your open blend files without even saving them and without you noticing it before it's too late.

I am working on a project that involves linking groups containing objects and armatures (like 90% of my projects so far). Nothing special. I just noticed that sometimes blend files get corrupted / behave differently / get completely messed up although I didn't even save them after changing something. I was lucky to have a working ".blend1" copy lying around each time.

IIRC 2.78 (?) introduced the possibility to relocate linked libraries which is great.

Some days ago I noticed that while using relocate to switch to a new version of a linked file the "Blender File" layout of the Outliner showed both the new and the old version of the linked file. The scene / rig itself kept working until I saved the scene and reloaded it. OK, I thought maybe I did do something wrong.
It felt kind of fishy that the outdated library still showed up in the Outliner's "Blender File" display after replacing it with another one. So this time I relocated the library to switch to the new version and after that used "Purge All" in the "Orphan Data" mode of the Outliner to get rid of the unused data blocks. The link to the old file was removed but all rigs were gone.

This was not what I wanted so I just closed the scene without saving.

Then I closed Blender and reloaded the previously working blend file. It was broken. I opened it on another computer just to be sure there was nothing still in memory that could cause this. The blend file was broken. It must have been saved after pressing "Purge All".

I did more tests with simple scenes and I can now reproduce what went wrong. To make a long story short: if you don't want to kill your scene don't use "Relocate" but replace it manually in the "Data Blocks" Outliner display. And don't use "Purge All" as it will silently overwrite your opened scene file without any warning.

Exact steps for others to reproduce the error

  • Open the attached "Masterscene.blend". It's a simple scene where I linked the "Link_Me" group of the attached "Scene_to_link_1.blend". I also made a proxy of the Armature inside the group to be able to animate the rig.

  • Go to the "Blender File" display mode of the Outliner

  • Right-click the "//Scene_to_link_1.blend" entry on the bottom and select "Relocate"

  • In the opening file browser select "Scene_to_link_2.blend". It's a 1:1 copy of the previously linked file

  • Notice that according to the Outliner both files are still linked while only the new one should be. The rig itself is still working.

  • Now either save the Masterscene.blend to a new file. After opening the new blend file both the link to the replaced library file and the rig will be gone.

  • Or if you want to destroy your Masterscene just switch the Outliner to display "Orphan Data" and use the "Purge All" button. The link to the old library file and the rig will be gone and your scene will be saved in this state afterwards!!! Hopefully you have a backup of it!

  • Using the "Datablocks" display in the Outliner and manually replacing the "_1" of the libraries file name with "_2" will properly replace the old library with the new one and everything works fine.

  • Basically it's the killer combination of the "Relocate" function not working 100% like expected and the "Purge All" button silently saving over your currently open blend file! "Purge All" only tells you that there will be no undo, but saving over your open blend file is a total no go!

Masterscene.blend

Scene_to_link_2.blend

Scene_to_link_1.blend

**System Information** Win10 x64, nVidia GTX 780 3GB **Blender Version** Broken: Official 2.78c, all current builds Worked: (optional) **(Not so) Short description of error** This one is either a complete misunderstanding of the concept of linked libraries on my side or a real bug, but either way it's a workflow and project killer lurking in the dark that should be taken care of ASAP. It can easily kill your open blend files without even saving them and without you noticing it before it's too late. I am working on a project that involves linking groups containing objects and armatures (like 90% of my projects so far). Nothing special. I just noticed that sometimes blend files get corrupted / behave differently / get completely messed up although I didn't even save them after changing something. I was lucky to have a working ".blend1" copy lying around each time. IIRC 2.78 (?) introduced the possibility to relocate linked libraries which is great. Some days ago I noticed that while using relocate to switch to a new version of a linked file the "Blender File" layout of the Outliner showed both the new and the old version of the linked file. The scene / rig itself kept working until I saved the scene and reloaded it. OK, I thought maybe I did do something wrong. It felt kind of fishy that the outdated library still showed up in the Outliner's "Blender File" display after replacing it with another one. So this time I relocated the library to switch to the new version and after that used "Purge All" in the "Orphan Data" mode of the Outliner to get rid of the unused data blocks. The link to the old file was removed but all rigs were gone. This was not what I wanted so I just closed the scene ***without saving***. Then I closed Blender and reloaded the previously working blend file. It was broken. I opened it on another computer just to be sure there was nothing still in memory that could cause this. The blend file was broken. It must have been saved after pressing "Purge All". I did more tests with simple scenes and I can now reproduce what went wrong. To make a long story short: if you don't want to kill your scene don't use "Relocate" but replace it manually in the "Data Blocks" Outliner display. And don't use "Purge All" as it will silently overwrite your opened scene file without any warning. **Exact steps for others to reproduce the error** - Open the attached "Masterscene.blend". It's a simple scene where I linked the "Link_Me" group of the attached "Scene_to_link_1.blend". I also made a proxy of the Armature inside the group to be able to animate the rig. - Go to the "Blender File" display mode of the Outliner - Right-click the "//Scene_to_link_1.blend" entry on the bottom and select "Relocate" - In the opening file browser select "Scene_to_link_2.blend". It's a 1:1 copy of the previously linked file - Notice that according to the Outliner both files are still linked while only the new one should be. The rig itself is still working. - Now either save the Masterscene.blend to a new file. After opening the new blend file both the link to the replaced library file and the rig will be gone. - Or if you want to destroy your Masterscene just switch the Outliner to display "Orphan Data" and use the "Purge All" button. The link to the old library file and the rig will be gone *and your scene will be saved in this state afterwards!!!* Hopefully you have a backup of it! - Using the "Datablocks" display in the Outliner and manually replacing the "_1" of the libraries file name with "_2" will properly replace the old library with the new one and everything works fine. - Basically it's the killer combination of the "Relocate" function not working 100% like expected and the "Purge All" button silently saving over your currently open blend file! "Purge All" only tells you that there will be no undo, but saving over your open blend file is a total no go! [Masterscene.blend](https://archive.blender.org/developer/F643237/Masterscene.blend) [Scene_to_link_2.blend](https://archive.blender.org/developer/F643239/Scene_to_link_2.blend) [Scene_to_link_1.blend](https://archive.blender.org/developer/F643238/Scene_to_link_1.blend)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @mont29

Added subscriber: @mont29
Bastien Montagne self-assigned this 2017-06-26 16:59:18 +02:00

Bah, proxy again… :(((( Issue confirmed.

Note that 'PurgeAll' operator merely indeed saves and reload the whole .blend file (as said in tooltip, this is irreversible action)… It’s old feature that ideally should be removed at some point, once new ID management is complete and fully working.

Bah, proxy again… :(((( Issue confirmed. Note that 'PurgeAll' operator merely indeed saves and reload the whole .blend file (as said in tooltip, this is irreversible action)… It’s old feature that ideally should be removed at some point, once new ID management is complete and fully working.

Nice you can reproduce it and thanks for your quick reaction.

The "Purge All" button shows a warning indeed but it only says that it "cannot be undone" which IMHO sounds a lot like it's not undoable in the current session of Blender. It doesn't warn you that it actually saves over your opened blend file which could be devastating.

Nice you can reproduce it and thanks for your quick reaction. The "Purge All" button shows a warning indeed but it only says that it "cannot be undone" which IMHO sounds a lot like it's not undoable in the current session of Blender. It doesn't warn you that it actually saves over your opened blend file which could be devastating.

This issue was referenced by d4ca2ec9d5

This issue was referenced by d4ca2ec9d5bda7d01203faaf8d271a2d87bf923f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Thanks Bastien for instantly fixing the linking bug and updating the "Purge All" button with important information! ?

Thanks Bastien for instantly fixing the linking bug and updating the "Purge All" button with important information! ?
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#51902
No description provided.