Page Menu
Home
Search
Configure Global Search
Log In
Files
F23312
tmp.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Bastien Montagne (mont29)
Nov 13 2013, 5:11 PM
Size
1 KB
Subscribers
None
tmp.diff
View Options
Index: release/scripts/modules/bpy/path.py
===================================================================
--- release/scripts/modules/bpy/path.py (révision 58446)
+++ release/scripts/modules/bpy/path.py (copie de travail)
@@ -92,15 +92,22 @@
when not set the current filename is used.
:type start: string
"""
+ def _check_same_drive(path1, path2):
+ return os.path.splitdrive(path1)[0] == os.path.splitdrive(path2)[0]
+
if isinstance(path, bytes):
if not path.startswith(b"//"):
if start is None:
start = _os.path.dirname(_getattr_bytes(_bpy.data, "filepath"))
+ if not _check_same_drive(path, start):
+ return path
return b"//" + _os.path.relpath(path, start)
else:
if not path.startswith("//"):
if start is None:
start = _os.path.dirname(_bpy.data.filepath)
+ if not _check_same_drive(path, start):
+ return path
return "//" + _os.path.relpath(path, start)
return path
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
07/e0/3b15acf759bb2383cf80b7c8893a
Event Timeline
Log In to Comment