Relative filepaths may be broken by Image.copy() #43159

Closed
opened 2015-01-08 12:16:01 +01:00 by Fabian Emmes · 12 comments

Blender Version
Broken: (example: 2.73 RC)

Short description of error
Image.copy() does not repair relative filepaths if they are "based" on a file in another directory.

Exact steps for others to reproduce the error
In relative_path_problem.zip , 'a/a.blend' references the Image 'logo.png' relatively (i.e., with path '//../logo.png'). File 'b.blend' references the Image object 'logo.png' from file 'a/a.blend'.

To reproduce:

  • Open file 'b.blend'.
  • Execute the statement "D.images['logo.png'].copy().filepath" in a python console.

The resulting filepath should be relative to the file 'b.blend', i.e. it should be '//logo.png', since 'b.blend' and 'logo.png' are in the same directory. Instead, the filepath of the original Image object is copied without change.

**Blender Version** Broken: (example: 2.73 RC) **Short description of error** Image.copy() does not repair relative filepaths if they are "based" on a file in another directory. **Exact steps for others to reproduce the error** In [relative_path_problem.zip](https://archive.blender.org/developer/F135963/relative_path_problem.zip) , 'a/a.blend' references the Image 'logo.png' relatively (i.e., with path '//../logo.png'). File 'b.blend' references the Image object 'logo.png' from file 'a/a.blend'. To reproduce: - Open file 'b.blend'. - Execute the statement "D.images['logo.png'].copy().filepath" in a python console. The resulting filepath should be relative to the file 'b.blend', i.e. it should be '//logo.png', since 'b.blend' and 'logo.png' are in the same directory. Instead, the filepath of the original Image object is copied without change.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @der_fab

Added subscriber: @der_fab

Added subscriber: @Psy-Fi

Added subscriber: @Psy-Fi

There is some information missing from the report:

What version are you using? What OS?

I'm asking because there were some fixes there recently and it would be good to know if you are testing on a platform where the fix applies and on aversion that has the fixes.

That said, I will try and reproduce on linux

There is some information missing from the report: What version are you using? What OS? I'm asking because there were some fixes there recently and it would be good to know if you are testing on a platform where the fix applies and on aversion that has the fixes. That said, I will try and reproduce on linux

Cannot reproduce on linux on latest master, waiting for information from reporter. Also please test latest 2.73 release candidate or release it should include the said fixes.

Cannot reproduce on linux on latest master, waiting for information from reporter. Also please test latest 2.73 release candidate or release it should include the said fixes.

Reproduced actually, sorry for the confusion

Reproduced actually, sorry for the confusion
Bastien Montagne self-assigned this 2015-01-08 13:34:15 +01:00

Can confirm it… ID.copy() should probably check for lib and rebase paths if needed? :/

Can confirm it… ID.copy() should probably check for lib and rebase paths if needed? :/
Author

I just downloaded the new 2.73 release from the blender homepage. The bug still exists in the 64 bit release build of blender 2.73 (Hash: b4d8fb5) on windows 8.1.

I just downloaded the new 2.73 release from the blender homepage. The bug still exists in the 64 bit release build of blender 2.73 (Hash: b4d8fb5) on windows 8.1.

This issue was referenced by 60e70c0c60

This issue was referenced by 60e70c0c6014e51954473e075a7679ad24648acd

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 60e70c0c60.

Closed by commit 60e70c0c60.

This issue was referenced by 95847f6ac7

This issue was referenced by 95847f6ac7ce074501d0f7f2b874ef4036601dc4
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
4 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#43159
No description provided.