Severe problem with multiple instances of a library (save and reload) #53977

Closed
opened 2018-02-01 15:31:32 +01:00 by Manuel Rais · 18 comments

System Information
Linux Mint 18 Sarah (Ubuntu 16.04.3 LTS)

Blender Version
Broken: 2.79 5bd8ac9abf

Short description of error
When renaming a library filepath to match another already linked, blender mixed libraries.
Example : lib_v01.blend, other_lib.blend and lib_v02.blend are linked in a blendfile (the link order is important).
When I rename lib_v01.blend to lib_v02.blend, save and reopen, Blender "merge" the multiple instances of lib_v02.blend.
But one of the Suzanne is now "attached" to other_lib.blend (instead of lib_v02.blend), and obvioulsy Blender doesn't find it.

Exact steps for others to reproduce the error

  1. Create a new blender file.
  2. Link the "Suzanne" group from lib_v01.blend
  3. Link the "Sphere" group from other_lib.blend
  4. Link the "Suzanne" group from lib_v02.blend
  5. Save the file.
  6. In the outliner, rename lib_v01.blend to lib_v02.blend
  7. Save and reopen the blendfile

lib_v02.blend

lib_v01.blend

other_lib.blend

**System Information** Linux Mint 18 Sarah (Ubuntu 16.04.3 LTS) **Blender Version** Broken: 2.79 5bd8ac9abfa **Short description of error** When renaming a library filepath to match another already linked, blender mixed libraries. Example : lib_v01.blend, other_lib.blend and lib_v02.blend are linked in a blendfile (the link order is important). When I rename lib_v01.blend to lib_v02.blend, save and reopen, Blender "merge" the multiple instances of lib_v02.blend. But one of the Suzanne is now "attached" to other_lib.blend (instead of lib_v02.blend), and obvioulsy Blender doesn't find it. **Exact steps for others to reproduce the error** 1. Create a new blender file. 2. Link the "Suzanne" group from lib_v01.blend 3. Link the "Sphere" group from other_lib.blend 4. Link the "Suzanne" group from lib_v02.blend 5. Save the file. 6. In the outliner, rename lib_v01.blend to lib_v02.blend 7. Save and reopen the blendfile [lib_v02.blend](https://archive.blender.org/developer/F2075484/lib_v02.blend) [lib_v01.blend](https://archive.blender.org/developer/F2075483/lib_v01.blend) [other_lib.blend](https://archive.blender.org/developer/F2075503/other_lib.blend)
Author

Added subscriber: @g-lul

Added subscriber: @g-lul

Added subscriber: @zeauro

Added subscriber: @zeauro

Sorry. But I don't understand what behaviour you are expecting.

You linked one suzanne from lib_v01, one suzanne from lib_v02 and one sphere from other_lib.

You renamed lib_v01 and only lib_v01. You did not rename other_lib. You did not do anything to sphere.
So when .blend is saved and reloaded, why do you expect link to other_lib to be removed ? Sphere is still attached to it.

Blender does not go further away than changes made by user.

Sorry. But I don't understand what behaviour you are expecting. You linked one suzanne from lib_v01, one suzanne from lib_v02 and one sphere from other_lib. You renamed lib_v01 and only lib_v01. You did not rename other_lib. You did not do anything to sphere. So when .blend is saved and reloaded, why do you expect link to other_lib to be removed ? Sphere is still attached to it. Blender does not go further away than changes made by user.
Author

Hi,
I'm not expecting other_lib.blend to be removed but the second Suzanne (from lib_v01.blend) to be linked to lib_v02.blend. And this is not happening. After save reopen, for blender, the second Suzanne is linked to other_lib.blend (but Suzanne has never be part of it).
Did you try the steps to reproduce this bug ?

Hi, I'm not expecting other_lib.blend to be removed but the second Suzanne (from lib_v01.blend) to be linked to lib_v02.blend. And this is not happening. After save reopen, for blender, the second Suzanne is linked to other_lib.blend (but Suzanne has never be part of it). Did you try the steps to reproduce this bug ?

Sorry. I did not follow correct order.

So, instances are removed on name basis but links are remapped according to their creation order.

Sorry. I did not follow correct order. So, instances are removed on name basis but links are remapped according to their creation order.
Author

Hi,
The issue is here since blender 2.76a I think.
2.75a does not have it.

Hi, The issue is here since blender 2.76a I think. 2.75a does not have it.

Added subscriber: @mont29

Added subscriber: @mont29
Bastien Montagne self-assigned this 2018-02-13 13:51:53 +01:00

Well, at least library relocation (rightclick on a lib in outliner, Relocate) does work correctly it seems.

Will see whether we can fix the issue with mere lib renaming, but I doubt this was ever supported, setting same paths for two different lib objects is really, really pulling Blender to its limits…

Well, at least library relocation (rightclick on a lib in outliner, Relocate) does work correctly it seems. Will see whether we can fix the issue with mere lib renaming, but I doubt this was ever supported, setting same paths for two different lib objects is really, really pulling Blender to its limits…
Author

Ok Bastien,
Thanks :)

Ok Bastien, Thanks :)
Author

Can I call the relocate operator from a python file ? I can't see any parameters with it. Or maybe bpy.ops.wm.lib_relocate can do the job ?

Can I call the relocate operator from a python file ? I can't see any parameters with it. Or maybe bpy.ops.wm.lib_relocate can do the job ?

In #53977#484387, @g-lul wrote:
Can I call the relocate operator from a python file ? I can't see any parameters with it. Or maybe bpy.ops.wm.lib_relocate can do the job ?

Yes, outside of outliner you should use bpy.ops.wm.lib_relocate directly (outliner version is a mere wrapper around that one anyway).

> In #53977#484387, @g-lul wrote: > Can I call the relocate operator from a python file ? I can't see any parameters with it. Or maybe bpy.ops.wm.lib_relocate can do the job ? Yes, outside of outliner you should use `bpy.ops.wm.lib_relocate` directly (outliner version is a mere wrapper around that one anyway).

Added subscriber: @Sergey

Added subscriber: @Sergey

Ok found the core of the issue.

@Sergey I would not be surprised if this was also the cause of the mysterious problems with disappearing libs at the studio.

Have a partial fix, but now we get multiple copies of same linked datablock (like, two copies of Suzanne group from lib_v02 in this report's demo), which is not a good thing either. Still investigating how to fix that second half of the issue…

Ok found the core of the issue. @Sergey I would not be surprised if this was also the cause of the mysterious problems with disappearing libs at the studio. Have a partial fix, but now we get multiple copies of same linked datablock (like, two copies of Suzanne group from lib_v02 in this report's demo), which is not a good thing either. Still investigating how to fix that second half of the issue…
Author

Hi,
I've tried to use the bpy.ops.wm.lib_relocate but I've got an issue with proxy relinking (I know you're in love with proxies Bastien :) ).
I've also tried with the bpy.ops.outliner.relocate in the outliner through the interface and the same error appears.
Result : the armature proxy become an empty.

Pose copy error, pose to:0x7f07ec228c28 from:(nil)
Proxy copy error, lib Object: Armature proxy Object: cube_proxy
Error: Not freed memory blocks: 1, total unfreed memory 0.001144 M

Is this a known bug ? If not, I'll try to do a bug report. I have a simple case to reproduce it.

Hi, I've tried to use the `bpy.ops.wm.lib_relocate` but I've got an issue with proxy relinking (I know you're in love with proxies Bastien :) ). I've also tried with the `bpy.ops.outliner.relocate` in the outliner through the interface and the same error appears. Result : the armature proxy become an empty. ``` Pose copy error, pose to:0x7f07ec228c28 from:(nil) Proxy copy error, lib Object: Armature proxy Object: cube_proxy Error: Not freed memory blocks: 1, total unfreed memory 0.001144 M ``` Is this a known bug ? If not, I'll try to do a bug report. I have a simple case to reproduce it.

Yep, would appreciate a report about this, relocate should work (but indeed most likely not all corner cases with ugly proxies are ironed out yet :( ).

Yep, would appreciate a report about this, relocate *should* work (but indeed most likely not all corner cases with ugly proxies are ironed out yet :( ).
Author

@mont29 Apparently, the "relocate bug" is not in the 2.79 release but in the 2.78a.
Should I report it nonetheless ?

@mont29 Apparently, the "relocate bug" is not in the 2.79 release but in the 2.78a. Should I report it nonetheless ?

@g-lul Nope, in fact if a bug does not affect current master, there’s no point in reporting it, since it has already (presumably) been solved. :)

@g-lul Nope, in fact if a bug does not affect current master, there’s no point in reporting it, since it has already (presumably) been solved. :)

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#53977
No description provided.