archive
/
blender-file
Archived
1
1
Fork 0

Library weak reference generates "path not found" errors when appending #94805

Closed
opened 2022-01-10 23:15:47 +01:00 by Mustard · 17 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.84

Blender Version
Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: blender/blender@f1cca30557 (tested also on latest 3.0.1 Release Candidate)
Worked: none

Short description of error
Library weak reference seems to be set on appending, but not pruned afterwards.
There is no way to remove this information from the file within Blender (I tried all possible cleaning functions + making path relative), nor with Python (Library weak reference is read-only), and it will always generate "path not found" errors.

Exact steps for others to reproduce the error

  • Open attached file or
    • Create two default files with default cube
    • Append a cube in one file (File 1) from the other one (File 2)
    • Delete File 2 (the one from where you appended)
    • Save, close and reopen File 1
  • Use the Report Missing Files operator ({nav File > External Data > Report Missing Files})
    The error "path not found" for "File 2" will appear

untitled2.blend

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.84 **Blender Version** Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: `blender/blender@f1cca30557` (tested also on latest 3.0.1 Release Candidate) Worked: none **Short description of error** *Library weak reference* seems to be set on appending, but not pruned afterwards. There is no way to remove this information from the file within Blender (I tried all possible cleaning functions + making path relative), nor with Python (Library weak reference is read-only), and it will always generate "path not found" errors. **Exact steps for others to reproduce the error** - Open attached file or - Create two default files with default cube - **Append** a cube in one file (File 1) from the other one (File 2) - **Delete** File 2 (the one from where you appended) - Save, close and reopen File 1 - Use the `Report Missing Files` operator ({nav File > External Data > Report Missing Files}) The error "path not found" for "File 2" will appear [untitled2.blend](https://archive.blender.org/developer/F12800072/untitled2.blend)
Author

Added subscriber: @Mustard

Added subscriber: @Mustard

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

I can confirm the problem.
The value in id->library_weak_reference->library_filepath of "MECube.001" points to a path that no longer exists.
But I'm not sure if this is a bug. This value seems to be a utility "to allow re-using already appended data in some cases, instead of appending it again".

But for me it's a little strange that this value is saved in the file. It seems too weak to be saved with the file (and may increase its size minimally).

I can confirm the problem. The value in `id->library_weak_reference->library_filepath` of "MECube.001" points to a path that no longer exists. But I'm not sure if this is a bug. This value seems to be a utility "to allow re-using already appended data in some cases, instead of appending it again". But for me it's a little strange that this value is saved in the file. It seems too weak to be saved with the file (and may increase its size minimally).

Added subscriber: @mont29

Added subscriber: @mont29
Bastien Montagne self-assigned this 2022-01-14 17:13:23 +01:00

It's saved in file to allow re-using same data on future append, even across editing sessions.

Should be ignored by 'missing paths' report though. will check on that.

It's saved in file to allow re-using same data on future append, even across editing sessions. Should be ignored by 'missing paths' report though. will check on that.
Author

Thank you for your answer (and your work in general)!

May I suggest the possibility to be able to prune these settings in some way, maybe through the already available cleaning functions? These references might become useless for instance if you share the file with other people (especially if they are saved as absolute paths).
In fact it is strange that once I append something, I am not able to clean these values in any way.

Thank you for your answer (and your work in general)! May I suggest the possibility to be able to prune these settings in some way, maybe through the already available cleaning functions? These references might become useless for instance if you share the file with other people (especially if they are saved as absolute paths). In fact it is strange that once I append something, I am not able to clean these values in any way.

Not sure this would be much useful to be honest, this info is supposed to fully internal currently, and invisible for the user...

We may go beyond in the future when it gets more used/exposed to the end user, but don't think it would be that useful currently to add more tools on it.

Not sure this would be much useful to be honest, this info is supposed to fully internal currently, and invisible for the user... We may go beyond in the future when it gets more used/exposed to the end user, but don't think it would be that useful currently to add more tools on it.

This issue was referenced by blender/blender@08822801ac

This issue was referenced by blender/blender@08822801acf648d23791fa308ec8c1c26f86963e

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Added subscriber: @sharpened

Added subscriber: @sharpened

@mont29 's commit fixes "path not found" reports for

bpy.ops.file.report_missing_files()

however I am running into a related issue reporting console warnings if I run

bpy.ops.file.make_paths_relative()

Warnings state: !!Warning: Path '\some_path.some_blend.blend' cannot be made relative!!

These warnings are fine and do not disrupt normal workflow, but I agree with @Mustard

In fact it is strange that once I append something, I am not able to clean these values in any way.

In my case, after appending files I do not need this weak reference, and they are in fact useless paths if the .blend is moved to another computer or the file which was targeted for the append no longer exists.
Although this is not exposed to the user outside of the console or data API, my worry is exposing personal file structure (or more importantly company-sensitive file structure) when publicly sharing a .blend

I would suggest adding the same fix into the 'make paths relative' functionality - but this does not fix my issue above
maybe allowing these paths to be writable in certain circumstances
maybe adding functionality to clear these paths in "Clean Up > Unused Data-Blocks" since they are in fact unused (but I guess are not data-blocks by definition)
maybe adding a button to "Clean Up" called "Unused Library Weak References"

@mont29 's commit fixes "path not found" reports for ``` bpy.ops.file.report_missing_files() ``` **however** I am running into a related issue reporting console warnings if I run ``` bpy.ops.file.make_paths_relative() ``` Warnings state: !!Warning: Path '\\some_path.some_blend.blend' cannot be made relative!! These warnings are *fine* and do not disrupt normal workflow, but I agree with @Mustard > In fact it is strange that once I append something, I am not able to clean these values in any way. In my case, after appending files I do not need this weak reference, and they are in fact useless paths if the .blend is moved to another computer or the file which was targeted for the append no longer exists. Although this is not exposed to the user outside of the console or data API, my worry is exposing personal file structure (or *more importantly* company-sensitive file structure) when publicly sharing a .blend I would suggest adding the same fix into the 'make paths relative' functionality - but this does not fix my issue above **maybe** allowing these paths to be writable in certain circumstances **maybe** adding functionality to clear these paths in "Clean Up > Unused Data-Blocks" since they are in fact *unused* (but I guess are not *data-blocks* by definition) **maybe** adding a button to "Clean Up" called "Unused Library Weak References"

Added subscriber: @Vyach

Added subscriber: @Vyach

Encountered the same. It is just annoying and confuse me as user, makes me feel something wrong.
I want to have clean and squiky file, that I can pass to customer or other worker without questions «what files are missing and why?»
So yes, please, make it deletable or cleanable at least.
There shouldnt be garbage, that I cant find clean, at least manually.

Encountered the same. It is just annoying and confuse me as user, makes me feel something wrong. I want to have clean and squiky file, that I can pass to customer or other worker without questions «what files are missing and why?» So yes, please, make it deletable or cleanable at least. There shouldn`t be garbage, that I can`t find clean, at least manually.
Author

I also confirm the issue.
Maybe you can boost the visibility of the problem creating a new Task?

I also confirm the issue. Maybe you can boost the visibility of the problem creating a new Task?

Added subscriber: @DarioDaF

Added subscriber: @DarioDaF
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
8 Participants
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: archive/blender-file#94805
No description provided.