Linked objects disappear when opened on another PC #37240

Closed
opened 2013-10-29 04:12:19 +01:00 by Wade Richardson · 12 comments

%%%--- Operating System, Graphics card ---
Windows 7 64 bit, GeForce GTX 770

- Blender version with error, and version that worked ---

Blender 2.68a fails, I checked 2.60a and it seemed to work correctly.

- Short description of error ---

Linked objects disappear when opened on another PC

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

I create this folder and file structure:

Project
Assets\monkey.blend
Scenes\scene1.blend

monkey.blend just has a default monkey head.
scene1 has a link to the monkey head. Relative path was selected during linking. when i save this file 'use relative' is also checked.

Now if I copy this folder structure to a flash drive, and open scene1.blend it looks fine. But if I take the flash drive to another PC (I have tried 2 PC's, both with the same version of blender) and open scene1.blend, the linked object is gone. If I made a proxy from the link then I have an empty with the same name in its place.
%%%

%%%--- Operating System, Graphics card --- Windows 7 64 bit, GeForce GTX 770 - Blender version with error, and version that worked --- Blender 2.68a fails, I checked 2.60a and it seemed to work correctly. - Short description of error --- Linked objects disappear when opened on another PC - Steps for others to reproduce the error (preferably based on attached .blend file) --- I create this folder and file structure: Project Assets\monkey.blend Scenes\scene1.blend monkey.blend just has a default monkey head. scene1 has a link to the monkey head. Relative path was selected during linking. when i save this file 'use relative' is also checked. Now if I copy this folder structure to a flash drive, and open scene1.blend it looks fine. But if I take the flash drive to another PC (I have tried 2 PC's, both with the same version of blender) and open scene1.blend, the linked object is gone. If I made a proxy from the link then I have an empty with the same name in its place. %%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%Please always attach files which demonstrates the issue. In this case it's monkey.blend and scene1.blend%%%

%%%Please always attach files which demonstrates the issue. In this case it's monkey.blend and scene1.blend%%%

%%%monkey.blend - http://www.pasteall.org/blend/24901
scene1.blend - http://www.pasteall.org/blend/24902

if my testing is correct scene1.blend will be pretty much an empty blend file for you (just a camera and lamp).%%%

%%%monkey.blend - http://www.pasteall.org/blend/24901 scene1.blend - http://www.pasteall.org/blend/24902 if my testing is correct scene1.blend will be pretty much an empty blend file for you (just a camera and lamp).%%%

%%%The paths in your files are absolute. You might see it if you run blender from the command line.

What are exact steps of reproducing this? Paths are always relative here if you use relative option for sure.%%%

%%%The paths in your files are absolute. You might see it if you run blender from the command line. What are exact steps of reproducing this? Paths are always relative here if you use relative option for sure.%%%

%%%Open Blender, delete default cube.
File -> Link, select the monkey in the other file. By default 'Relative Path' is checked.
File -> Save As, name it scene1.blend and save. By default 'Remap Relative is checked.
Now move monkey.blend and scene1.blend to another location on the hard drive. It should still work. Then put it on a flash drive and try it on another PC.%%%

%%%Open Blender, delete default cube. File -> Link, select the monkey in the other file. By default 'Relative Path' is checked. File -> Save As, name it scene1.blend and save. By default 'Remap Relative is checked. Now move monkey.blend and scene1.blend to another location on the hard drive. It should still work. Then put it on a flash drive and try it on another PC.%%%
Member

%%%Hello Wade,

I believe I know the issue that you ran into. When you link in an object into a file that has NOT been saved yet, Blender doesn't know how to create the relative path (to the yet not existing .blend file on disk). In this case, even if 'Relative Path' is set, Blender has to store the absolute path and this will break if you move it to another computer.
This is a known limitation
The situation is this: The .blend file on your flash drive contains the absolute path to the file which still exists on your computer, but when you move it to a different computer, it will not be found anymore.

Now what you can do to solve the issue is first, make sure that the .blend file is saved before you link in stuff, then the relative path will work fine.
To fix the existing .blend file, open it and choose File -> External Data -> Make all paths relative.
After saving the file again it should be possible to safely copy it to your flash drive and open it fine on another computer.

Andrea
%%%

%%%Hello Wade, I believe I know the issue that you ran into. When you link in an object into a file that has NOT been saved yet, Blender doesn't know how to create the relative path (to the yet not existing .blend file on disk). In this case, even if 'Relative Path' is set, Blender has to store the absolute path and this will break if you move it to another computer. This is a known limitation The situation is this: The .blend file on your flash drive contains the absolute path to the file which still exists on your computer, but when you move it to a different computer, it will not be found anymore. Now what you can do to solve the issue is first, make sure that the .blend file is saved before you link in stuff, then the relative path will work fine. To fix the existing .blend file, open it and choose File -> External Data -> Make all paths relative. After saving the file again it should be possible to safely copy it to your flash drive and open it fine on another computer. Andrea %%%
Member

%%%Hello Campbell,
I'm attaching a patch that fixes the issue, but would like you to take a look before I commit, because
a) might make the code still a bit more confused, so maybe we should do a larger rewrite of the file saving flags?
b) might have subtle effects, especially changing the remap relative in the normal save operator (not the save over)
From my analysis, the issue might have been cause by rev. 53011, since the detection of whether we are saving for the first time was dependent on the G.main->name being empty.
Andrea%%%

%%%Hello Campbell, I'm attaching a patch that fixes the issue, but would like you to take a look before I commit, because a) might make the code still a bit more confused, so maybe we should do a larger rewrite of the file saving flags? b) might have subtle effects, especially changing the remap relative in the normal save operator (not the save over) From my analysis, the issue might have been cause by rev. 53011, since the detection of whether we are saving for the first time was dependent on the G.main->name being empty. Andrea%%%

This issue was referenced by blender/blender-addons-contrib@95bf31e4fe

This issue was referenced by blender/blender-addons-contrib@95bf31e4fee327f9d0ca7e017997642398e2b023

This issue was referenced by 95bf31e4fe

This issue was referenced by 95bf31e4fee327f9d0ca7e017997642398e2b023

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 95bf31e4fe.

Closed by commit 95bf31e4fe.

Committed alternative workaround, when saving an unsaved blend will enable path-remapping.
also don't disable path-remapping when saving from an unsaved blend file.

Committed alternative workaround, when saving an unsaved blend will enable path-remapping. also don't disable path-remapping when saving from an unsaved blend file.
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
5 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#37240
No description provided.