Linked objects disappear when opened on another PC #37240

Closed
opened 9 years ago by kwr426 · 12 comments
kwr426 commented 9 years ago

%%%--- 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. %%%
kwr426 commented 9 years ago
Poster

Changed status to: 'Open'

Changed status to: 'Open'
Sergey commented 9 years ago
Owner

%%%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%%%
kwr426 commented 9 years ago
Poster

%%%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).%%%
Sergey commented 9 years ago
Owner

%%%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.%%%
kwr426 commented 9 years ago
Poster

%%%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.%%%
elubie commented 9 years ago
Collaborator

%%%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 %%%
elubie commented 9 years ago
Collaborator

%%%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%%%
Collaborator

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

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

This issue was referenced by 95bf31e4fe

This issue was referenced by 95bf31e4fee327f9d0ca7e017997642398e2b023
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
ideasman42 closed this issue 9 years ago
Owner

Closed by commit 95bf31e4fe.

Closed by commit 95bf31e4fe.
Owner

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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#37240
Loading…
There is no content yet.