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-05-16 11:52:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-16 11:52:45 +0400
commitfca80ff61e8bbce39bc2584a6ad7e7659577d1b1 (patch)
tree0018c389f019c9762c5c21245fa55ecb6bfefd0e /io_scene_obj
parent5751efe5ae443c4d84bf8cdcb85a73b4506a58bc (diff)
update for changes in blender module layout, also add global axis conversion to FBX.
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/__init__.py5
-rw-r--r--io_scene_obj/export_obj.py8
-rw-r--r--io_scene_obj/import_obj.py2
3 files changed, 7 insertions, 8 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index a990afe6..b5f3cb9b 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -43,8 +43,7 @@ if "bpy" in locals():
import bpy
from bpy.props import BoolProperty, FloatProperty, StringProperty, EnumProperty
-import io_utils
-from io_utils import ExportHelper, ImportHelper
+from bpy_extras.io_utils import ExportHelper, ImportHelper, path_reference_mode
class ImportOBJ(bpy.types.Operator, ImportHelper):
@@ -158,7 +157,7 @@ class ExportOBJ(bpy.types.Operator, ExportHelper):
group_by_material = BoolProperty(name="Material Groups", description="", default=False)
keep_vertex_order = BoolProperty(name="Keep Vertex Order", description="", default=False)
- path_mode = io_utils.path_reference_mode
+ path_mode = path_reference_mode
def execute(self, context):
from . import export_obj
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index b2537696..5c24fbf7 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -24,7 +24,7 @@ import shutil
import bpy
import mathutils
-import io_utils
+import bpy_extras.io_utils
def name_compat(name):
@@ -108,7 +108,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 = 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)
file.write('map_Kd %s\n' % rel) # Diffuse mapping image
if mat: # No face image. if we havea material search for MTex image.
@@ -135,7 +135,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 = 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)
file.write('%s %s\n' % (key, repr(filepath)[1:-1]))
file.write('\n\n')
@@ -650,7 +650,7 @@ def write_file(filepath, objects, scene,
write_mtl(scene, mtlfilepath, EXPORT_PATH_MODE, copy_set, mtl_dict)
# copy all collected files.
- io_utils.path_reference_copy(copy_set)
+ bpy_extras.io_utils.path_reference_copy(copy_set)
print("OBJ Export time: %.2f" % (time.clock() - time1))
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index d37608ca..a9708121 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -36,7 +36,7 @@ import time
import bpy
import mathutils
from mathutils.geometry import tesselate_polygon
-from io_utils import load_image, unpack_list, unpack_face_list
+from bpy_extras.io_utils import load_image, unpack_list, unpack_face_list
def BPyMesh_ngon(from_data, indices, PREF_FIX_LOOPS=True):