Page MenuHome

Edit linked library addon breaks relative links
Open, Confirmed, MediumPublic

Description

System Information
Operating system: Windows 10
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2

Blender Version
Broken:
version: 2.80 (sub 74), branch: master, commit date: 2019-07-11 13:50, hash: 06312c6d2db8

Short description of error
Edit linked library addon breaks relative links when toggling between files, when the child file also has linked materials.

Exact steps for others to reproduce the error
Based on attached files:
1- open scene/base.blend
It is linking an object from ..\obj\object.blend, and then that object is linking a material from ..\Mat\mat.blend
If I edit any file from the File>Open menu, everything works well.
but If I use the Edit Linked Library addon, by:

2 - select "cubito" object and File>External Data>Edit Linked Library

3- then File>External Data>Return to original file (or corresponding hotkeys)
It breaks the relative links by turning
..\Mat\mat.blend into ..\..\..\Mat\mat.blend

This is happening in several files I'm working on and in several blender 2.8 versions from a couple of weeks back.
This add-on has been amazingly useful, hope this is an easy fix!

Details

Type
Bug

Event Timeline

I can confirm the above issue on a daily build of version 2.80 (Hash: 65168825e0b0) on my laptop (Win10 64bit, GeForce 1070). The add-on seems to loose the correct relative path to the linked material, after editing the linked object, apart from other minor issues (see below):

Traceback (most recent call last):

File "D:\Blender_2.80_stable\2.80\scripts\addons\object_edit_linked.py", line 56, in linked_file_check
  context.view_layer.objects.active = bpy.data.objects[settings["linked_objects"][0]]

AttributeError: 'NoneType' object has no attribute 'view_layer'

The material file is being searched with the wrong relative path, while the linked object file's relative path is fine.

Unfortunately, with such scenario, it seems that even with the previous version 2.79b, when you edit the linked object using the Edit Linked Object add-on (ver. 0.8.1), and then return to the start file, it doesn't apply the correct relative path to the just edited file breaking links to external assets.

After several tests with Blender 2.79b, the above issue appears only when using relative paths, while it works fine with absolute paths. When using relative paths they get broken in the linked file being edited using the add-on.

Inside the add-on's code (line 218) there is a note about nested links which suggests to use another instance of Blender to edit the linked file, but even so the issue is still there.

Seems to be fine here on linux...

Yep, tried it at home in linux and works well.. guess it is mostly a windows problem, will try during the week on several windows and macs at work.

Tried it on windows 10 (different computers) and windows 8, and it is buggy too.

But it does work on macOS (tested on Mojave) and Linux(Ubuntu) as mentioned before, so it seems to be a windows problem only :(

Thank you Federico for testing it on Windows too. So it's confirmed. Do you think it can be fixed? This is a crucial add-on but in this state it's not only useless but also dangerous if your are not aware of how it messes up with the paths in the edited linked file.