Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
2570e966
Commit
2570e966
authored
11 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
fix error when finding relative paths on windows.
parent
39168323
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
io_import_images_as_planes.py
+9
-1
9 additions, 1 deletion
io_import_images_as_planes.py
with
9 additions
and
1 deletion
io_import_images_as_planes.py
+
9
−
1
View file @
2570e966
...
...
@@ -453,7 +453,15 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
image
.
use_fields
=
self
.
use_fields
if
self
.
relative
:
image
.
filepath
=
bpy
.
path
.
relpath
(
image
.
filepath
)
# can't always find the relative path
# (between drive letters on windows)
try
:
filepath_rel
=
bpy
.
path
.
relpath
(
image
.
filepath
)
except
ValueError
:
filepath_rel
=
None
if
filepath_rel
is
not
None
:
image
.
filepath
=
filepath_rel
def
set_texture_options
(
self
,
context
,
texture
):
texture
.
image
.
use_alpha
=
self
.
use_transparency
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment