Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-11 08:44:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-11 08:44:52 +0400
commit1a21899facaac90ee7b296ce84ed859198b5ad3b (patch)
treeba4f22df0f5efd2de7f2d938e35159a40b923e0e
parentad8251bfdda50def103063b9fa8fc8c89aa0ccb9 (diff)
use library argument for bpy_extras.io_utils.path_reference(...)
-rw-r--r--io_mesh_ply/export_ply.py2
-rw-r--r--io_scene_fbx/export_fbx.py6
-rw-r--r--io_scene_obj/export_obj.py4
-rw-r--r--io_scene_x3d/export_x3d.py4
-rw-r--r--object_animrenderbake.py2
-rw-r--r--render_povray/render.py4
6 files changed, 11 insertions, 11 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 928bfbe0..b02dd139 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -47,7 +47,7 @@ def save(operator,
return round(v[0], 6), round(v[1], 6)
scene = context.scene
- obj = context.object
+ obj = context.active_object
if not obj:
raise Exception("Error, Select 1 active object")
diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py
index 6e940067..4bbc1931 100644
--- a/io_scene_fbx/export_fbx.py
+++ b/io_scene_fbx/export_fbx.py
@@ -1140,7 +1140,7 @@ def save_single(operator, scene, filepath="",
Property: "Width", "int", "",0
Property: "Height", "int", "",0''')
if tex:
- fname_rel = bpy_extras.io_utils.path_reference(tex.filepath, base_src, base_dst, path_mode, "", copy_set)
+ fname_rel = bpy_extras.io_utils.path_reference(tex.filepath, base_src, base_dst, path_mode, "", copy_set, tex.library)
fname_strip = bpy.path.basename(fname_rel)
else:
fname_strip = fname_rel = ""
@@ -1199,8 +1199,8 @@ def save_single(operator, scene, filepath="",
fw('\n\t\tMedia: "Video::%s"' % texname)
if tex:
- fname_rel = bpy_extras.io_utils.path_reference(tex.filepath, base_src, base_dst, path_mode, "", copy_set)
- fname_strip = bpy.path.basename(bpy.path.abspath(fname_rel))
+ fname_rel = bpy_extras.io_utils.path_reference(tex.filepath, base_src, base_dst, path_mode, "", copy_set, tex.library)
+ fname_strip = bpy.path.basename(fname_rel)
else:
fname_strip = fname_rel = ""
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index b5cf778e..6d00bb42 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -101,7 +101,7 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict):
# Write images!
if face_img: # We have an image on the face!
# write relative image path
- rel = bpy_extras.io_utils.path_reference(face_img.filepath, source_dir, dest_dir, path_mode, "", copy_set)
+ rel = bpy_extras.io_utils.path_reference(face_img.filepath, source_dir, dest_dir, path_mode, "", copy_set, face_img.library)
fw('map_Kd %s\n' % rel) # Diffuse mapping image
if mat: # No face image. if we havea material search for MTex image.
@@ -128,7 +128,7 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict):
image_map["map_Ns"] = image
for key, image in image_map.items():
- filepath = bpy_extras.io_utils.path_reference(image.filepath, source_dir, dest_dir, path_mode, "", copy_set)
+ filepath = bpy_extras.io_utils.path_reference(image.filepath, source_dir, dest_dir, path_mode, "", copy_set, image.library)
fw('%s %s\n' % (key, repr(filepath)[1:-1]))
fw('\n\n')
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index c57e459c..7f5972c0 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -1238,8 +1238,8 @@ def export(file,
# collect image paths, can load multiple
# [relative, name-only, absolute]
filepath = image.filepath
- filepath_full = bpy.path.abspath(filepath)
- filepath_ref = bpy_extras.io_utils.path_reference(filepath_full, base_src, base_dst, path_mode, "textures", copy_set)
+ filepath_full = bpy.path.abspath(filepath, library=image.library)
+ filepath_ref = bpy_extras.io_utils.path_reference(filepath_full, base_src, base_dst, path_mode, "textures", copy_set, image.library)
filepath_base = os.path.basename(filepath_full)
images = [
diff --git a/object_animrenderbake.py b/object_animrenderbake.py
index 0c354408..054d1d39 100644
--- a/object_animrenderbake.py
+++ b/object_animrenderbake.py
@@ -94,7 +94,7 @@ class OBJECT_OT_animrenderbake(bpy.types.Operator):
return {'CANCELLED'}
# make sure we have an absolute path so that copying works for sure
- absp = bpy.path.abspath(img.filepath)
+ absp = bpy.path.abspath(img.filepath, library=img.library)
print("Animated baking for frames " + str(start) + " - " + str(end))
diff --git a/render_povray/render.py b/render_povray/render.py
index 72c71b86..3324c4f0 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -2067,7 +2067,7 @@ class PovrayRender(bpy.types.RenderEngine):
# check paths
povPath = bpy.path.abspath(scene.pov.scene_path).replace('\\', '/')
if povPath == "":
- if bpy.path.abspath("//") != "":
+ if bpy.data.is_saved:
povPath = bpy.path.abspath("//")
else:
povPath = tempfile.gettempdir()
@@ -2094,7 +2094,7 @@ class PovrayRender(bpy.types.RenderEngine):
# Bug in POV-Ray RC3
renderImagePath = bpy.path.abspath(scene.pov.renderimage_path).replace('\\','/')
if renderImagePath == "":
- if bpy.path.abspath("//") != "":
+ if bpy.data.is_saved:
renderImagePath = bpy.path.abspath("//")
else:
renderImagePath = tempfile.gettempdir()