Saving with "Remap Relative" makes ALL paths relative #62612

Closed
opened 2019-03-15 14:07:17 +01:00 by Sybren A. Stüvel · 16 comments

System Information
Operating system: Ubuntu Linux 18.04

Blender Version
Broken: e583e86a9a
Worked: not sure this ever worked correctly

Short description of error

I would expect that saving a file with the "Remap Relative" checkbox checked would only remap relative paths. However, it makes all paths relative.
This is an issue a the Blender Animation Studio, where often we reference files on /render that should never be remapped to //../../../../../render.

Exact steps for others to reproduce the error

  • Extract remap_relative_bug.zip into $SOMEDIR/subdir1
  • Open the blend file
  • Choose File > External Data > Make all paths absolute
  • Inspect the path of the image shown, it is$SOMEDIR/subdir1/background_caminandes_3_03.jpg
  • Save the blend file to $SOMEDIR/subdir2 and make sure the "Remap Relative" checkbox is checked
  • Inspect the path of the image shown, it is now //../subdir1/background_caminandes_3_03.jpg
**System Information** Operating system: Ubuntu Linux 18.04 **Blender Version** Broken: e583e86a9af458058fb2f92de6aaafb681756549 Worked: not sure this ever worked correctly **Short description of error** I would expect that saving a file with the "Remap Relative" checkbox checked would only remap relative paths. However, it makes **all** paths relative. This is an issue a the Blender Animation Studio, where often we reference files on `/render` that should never be remapped to `//../../../../../render`. **Exact steps for others to reproduce the error** - Extract [remap_relative_bug.zip](https://archive.blender.org/developer/F6829689/remap_relative_bug.zip) into `$SOMEDIR/subdir1` - Open the blend file - Choose File > External Data > Make all paths absolute - Inspect the path of the image shown, it is`$SOMEDIR/subdir1/background_caminandes_3_03.jpg` - Save the blend file to `$SOMEDIR/subdir2` and make sure the "Remap Relative" checkbox is checked - Inspect the path of the image shown, it is now `//../subdir1/background_caminandes_3_03.jpg`
Author
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Added subscribers: @brecht, @ZedDB

Added subscribers: @brecht, @ZedDB
Brecht Van Lommel was assigned by Sebastian Parborg 2019-03-15 16:41:34 +01:00

@brecht while the tooltip indeed says that it will remap relative paths, the code in question only skips relative paths and converts all non-relative paths.
So I'm guessing this is intended?

@brecht while the tooltip indeed says that it will remap relative paths, the code in question only skips relative paths and converts all non-relative paths. So I'm guessing this is intended?
Brecht Van Lommel removed their assignment 2019-03-15 17:19:05 +01:00
Campbell Barton was assigned by Brecht Van Lommel 2019-03-15 17:19:05 +01:00
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member
No description provided.

Added subscriber: @mont29

Added subscriber: @mont29

@ideasman42 or @mont29 probably know more, but as far as I know this is intended. At least when saving a .blend for the first time making absolute paths relative is important, since we want relative paths by default but can't do it when the file is not saved yet.

An additional option could be added to the operator. For many workflows it's also never right to make a path to a different root folder relative, there could be a preference for that. But those are not bugs.

@ideasman42 or @mont29 probably know more, but as far as I know this is intended. At least when saving a .blend for the first time making absolute paths relative is important, since we want relative paths by default but can't do it when the file is not saved yet. An additional option could be added to the operator. For many workflows it's also never right to make a path to a different root folder relative, there could be a preference for that. But those are not bugs.
Author
Member

I think there is at least one bug here -- either in the name & tooltip, or in the implementation, because right now they contradict each other.

At least when saving a .blend for the first time making absolute paths relative is important, since we want relative paths by default but can't do it when the file is not saved yet.

That's all fine. However, when changing the relative paths because the blend file is saved in a different location, I don't see why absolute paths need to be touched at all.

For many workflows it's also never right to make a path to a different root folder relative, there could be a preference for that. But those are not bugs.

I agree, that would be a welcome feature, not a bug.

I think there is at least one bug here -- either in the name & tooltip, or in the implementation, because right now they contradict each other. > At least when saving a .blend for the first time making absolute paths relative is important, since we want relative paths by default but can't do it when the file is not saved yet. That's all fine. However, when changing the relative paths because the blend file is saved in a different location, I don't see why absolute paths need to be touched at all. > For many workflows it's also never right to make a path to a different root folder relative, there could be a preference for that. But those are not bugs. I agree, that would be a welcome feature, not a bug.

This issue was referenced by 6c0240e84a

This issue was referenced by 6c0240e84a2c06af506697242e0ba42fa4998ee5

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

what @brecht and @dr.sybren said: nice to support but with so many open bugs, clarify tooltip for now.

what @brecht and @dr.sybren said: nice to support but with so many open bugs, clarify tooltip for now.
Author
Member

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Author
Member

This seems to be a "make things consistent for now, fix properly later" kind of thing, so this task should remain open until it's properly addressed. The label of the checkbox hasn't changed, so "remap relative" still means "remap everything".

This is not just me being pedantic about a label on a checkbox. There are often cases where absolute paths are silently and unexpectedly turned into relative paths here in the studio. We use absolute vs. relative to determine which files should be BAT-packed when sent to the local farm (absolute paths are not packed, because workers can reach them at that path). Having absolute paths changed to relative causes files to be unnecessarily copied to the render farm; referencing blend files are then also rewritten to have their paths remapped. This causes an unnecessary increase in storage requirements and unnecessary delays for our artists.

This seems to be a "make things consistent for now, fix properly later" kind of thing, so this task should remain open until it's properly addressed. The label of the checkbox hasn't changed, so "remap relative" still means "remap everything". This is not just me being pedantic about a label on a checkbox. There are often cases where absolute paths are silently and unexpectedly turned into relative paths here in the studio. We use absolute vs. relative to determine which files should be BAT-packed when sent to the local farm (absolute paths are not packed, because workers can reach them at that path). Having absolute paths changed to relative causes files to be unnecessarily copied to the render farm; referencing blend files are then also rewritten to have their paths remapped. This causes an unnecessary increase in storage requirements and unnecessary delays for our artists.

Added subscriber: @John514

Added subscriber: @John514

This issue was referenced by f7386b9757

This issue was referenced by f7386b97571e0207281f4504f45e13d4beb1c25b

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' 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
7 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#62612
No description provided.