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
parent5751efe5ae443c4d84bf8cdcb85a73b4506a58bc (diff)
update for changes in blender module layout, also add global axis conversion to FBX.
-rw-r--r--add_mesh_ant_landscape.py4
-rw-r--r--add_mesh_extra_objects/add_mesh_3d_function_surface.py4
-rw-r--r--add_mesh_extra_objects/add_mesh_extra_objects.py4
-rw-r--r--add_mesh_extra_objects/add_mesh_gears.py4
-rw-r--r--add_mesh_extra_objects/add_mesh_gemstones.py4
-rw-r--r--add_mesh_extra_objects/add_mesh_twisted_torus.py4
-rw-r--r--add_mesh_pipe_joint.py4
-rw-r--r--add_mesh_solid.py2
-rw-r--r--io_anim_bvh/__init__.py2
-rw-r--r--io_anim_camera.py2
-rw-r--r--io_convert_image_to_mesh_img/__init__.py2
-rw-r--r--io_curve_svg/__init__.py2
-rw-r--r--io_export_pc2.py2
-rw-r--r--io_import_images_as_planes.py2
-rw-r--r--io_import_scene_mhx.py2
-rw-r--r--io_mesh_ply/__init__.py2
-rw-r--r--io_mesh_ply/import_ply.py2
-rw-r--r--io_mesh_raw/import_raw.py2
-rw-r--r--io_mesh_stl/__init__.py2
-rw-r--r--io_scene_3ds/__init__.py2
-rw-r--r--io_scene_3ds/export_3ds.py3
-rw-r--r--io_scene_3ds/import_3ds.py2
-rw-r--r--io_scene_fbx/__init__.py53
-rw-r--r--io_scene_fbx/export_fbx.py8
-rw-r--r--io_scene_m3/__init__.py2
-rw-r--r--io_scene_m3/import_m3.py2
-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
-rw-r--r--io_scene_x3d/__init__.py2
-rw-r--r--io_scene_x3d/export_x3d.py2
-rw-r--r--io_scene_x3d/import_x3d.py2
-rw-r--r--io_shape_mdd/__init__.py2
-rw-r--r--object_cloud_gen.py2
-rw-r--r--system_demo_mode/__init__.py2
-rw-r--r--texture_paint_layer_manager.py2
36 files changed, 77 insertions, 76 deletions
diff --git a/add_mesh_ant_landscape.py b/add_mesh_ant_landscape.py
index e287030d..d7ca08d0 100644
--- a/add_mesh_ant_landscape.py
+++ b/add_mesh_ant_landscape.py
@@ -94,8 +94,8 @@ def create_mesh_object(context, verts, edges, faces, name):
# Update mesh geometry after adding stuff.
mesh.update()
- import add_object_utils
- return add_object_utils.object_data_add(context, mesh, operator=None)
+ from bpy_extras import object_utils
+ return object_utils.object_data_add(context, mesh, operator=None)
# A very simple "bridge" tool.
# Connects two equally long vertex rows with faces.
diff --git a/add_mesh_extra_objects/add_mesh_3d_function_surface.py b/add_mesh_extra_objects/add_mesh_3d_function_surface.py
index e415813a..7b0bd8c0 100644
--- a/add_mesh_extra_objects/add_mesh_3d_function_surface.py
+++ b/add_mesh_extra_objects/add_mesh_3d_function_surface.py
@@ -140,8 +140,8 @@ def create_mesh_object(context, verts, edges, faces, name):
# Update mesh geometry after adding stuff.
mesh.update()
- import add_object_utils
- return add_object_utils.object_data_add(context, mesh, operator=None)
+ from bpy_extras import object_utils
+ return object_utils.object_data_add(context, mesh, operator=None)
# A very simple "bridge" tool.
diff --git a/add_mesh_extra_objects/add_mesh_extra_objects.py b/add_mesh_extra_objects/add_mesh_extra_objects.py
index f87bb044..c5caa120 100644
--- a/add_mesh_extra_objects/add_mesh_extra_objects.py
+++ b/add_mesh_extra_objects/add_mesh_extra_objects.py
@@ -38,8 +38,8 @@ def create_mesh_object(context, verts, edges, faces, name):
# Update mesh geometry after adding stuff.
mesh.update()
- import add_object_utils
- return add_object_utils.object_data_add(context, mesh, operator=None)
+ from bpy_extras import object_utils
+ return object_utils.object_data_add(context, mesh, operator=None)
# A very simple "bridge" tool.
diff --git a/add_mesh_extra_objects/add_mesh_gears.py b/add_mesh_extra_objects/add_mesh_gears.py
index 47cc950e..a04e6beb 100644
--- a/add_mesh_extra_objects/add_mesh_gears.py
+++ b/add_mesh_extra_objects/add_mesh_gears.py
@@ -87,8 +87,8 @@ def create_mesh_object(context, verts, edges, faces, name):
# Update mesh geometry after adding stuff.
mesh.update()
- import add_object_utils
- return add_object_utils.object_data_add(context, mesh, operator=None)
+ from bpy_extras import object_utils
+ return object_utils.object_data_add(context, mesh, operator=None)
# A very simple "bridge" tool.
diff --git a/add_mesh_extra_objects/add_mesh_gemstones.py b/add_mesh_extra_objects/add_mesh_gemstones.py
index 9af8cdb6..d4158b68 100644
--- a/add_mesh_extra_objects/add_mesh_gemstones.py
+++ b/add_mesh_extra_objects/add_mesh_gemstones.py
@@ -53,8 +53,8 @@ def create_mesh_object(context, verts, edges, faces, name):
# Update mesh geometry after adding stuff.
mesh.update()
- import add_object_utils
- return add_object_utils.object_data_add(context, mesh, operator=None)
+ from bpy_extras import object_utils
+ return object_utils.object_data_add(context, mesh, operator=None)
# A very simple "bridge" tool.
diff --git a/add_mesh_extra_objects/add_mesh_twisted_torus.py b/add_mesh_extra_objects/add_mesh_twisted_torus.py
index 82edee6b..6eb8cc24 100644
--- a/add_mesh_extra_objects/add_mesh_twisted_torus.py
+++ b/add_mesh_extra_objects/add_mesh_twisted_torus.py
@@ -68,8 +68,8 @@ def create_mesh_object(context, verts, edges, faces, name):
# Update mesh geometry after adding stuff.
mesh.update()
- import add_object_utils
- return add_object_utils.object_data_add(context, mesh, operator=None)
+ from bpy_extras import object_utils
+ return object_utils.object_data_add(context, mesh, operator=None)
# A very simple "bridge" tool.
# Connects two equally long vertex rows with faces.
diff --git a/add_mesh_pipe_joint.py b/add_mesh_pipe_joint.py
index 6156d459..69b547ed 100644
--- a/add_mesh_pipe_joint.py
+++ b/add_mesh_pipe_joint.py
@@ -148,8 +148,8 @@ def create_mesh_object(context, verts, edges, faces, name):
# Update mesh geometry after adding stuff.
mesh.update()
- import add_object_utils
- return add_object_utils.object_data_add(context, mesh, operator=None)
+ from bpy_extras import object_utils
+ return object_utils.object_data_add(context, mesh, operator=None)
# A very simple "bridge" tool.
# Connects two equally long vertex rows with faces.
diff --git a/add_mesh_solid.py b/add_mesh_solid.py
index f8e4f3b4..01825d29 100644
--- a/add_mesh_solid.py
+++ b/add_mesh_solid.py
@@ -37,7 +37,7 @@ from bpy.props import FloatProperty,EnumProperty,BoolProperty
from math import sqrt
from mathutils import Vector,Matrix
from functools import reduce
-from add_object_utils import object_data_add
+from bpy_extras.object_utils import object_data_add
# this function creates a chain of quads and, when necessary, a remaining tri
# for each polygon created in this script. be aware though, that this function
diff --git a/io_anim_bvh/__init__.py b/io_anim_bvh/__init__.py
index 5cdc79f2..94d048f6 100644
--- a/io_anim_bvh/__init__.py
+++ b/io_anim_bvh/__init__.py
@@ -42,7 +42,7 @@ if "bpy" in locals():
import bpy
from bpy.props import StringProperty, FloatProperty, IntProperty, BoolProperty, EnumProperty
-from io_utils import ImportHelper, ExportHelper
+from bpy_extras.io_utils import ImportHelper, ExportHelper
class ImportBVH(bpy.types.Operator, ImportHelper):
diff --git a/io_anim_camera.py b/io_anim_camera.py
index 22b2cf0d..2026254d 100644
--- a/io_anim_camera.py
+++ b/io_anim_camera.py
@@ -115,7 +115,7 @@ def writeCameras(context, filepath, frame_start, frame_end, only_selected=False)
from bpy.props import StringProperty, IntProperty, BoolProperty
-from io_utils import ExportHelper
+from bpy_extras.io_utils import ExportHelper
class CameraExporter(bpy.types.Operator, ExportHelper):
diff --git a/io_convert_image_to_mesh_img/__init__.py b/io_convert_image_to_mesh_img/__init__.py
index 93e3ac25..e3309617 100644
--- a/io_convert_image_to_mesh_img/__init__.py
+++ b/io_convert_image_to_mesh_img/__init__.py
@@ -50,7 +50,7 @@ else:
import bpy
from bpy.props import *
-from io_utils import ImportHelper
+from bpy_extras.io_utils import ImportHelper
class ImportHiRISEIMGDTM(bpy.types.Operator, ImportHelper):
diff --git a/io_curve_svg/__init__.py b/io_curve_svg/__init__.py
index cf5ad416..dc68490b 100644
--- a/io_curve_svg/__init__.py
+++ b/io_curve_svg/__init__.py
@@ -43,7 +43,7 @@ if "bpy" in locals():
import bpy
from bpy.props import StringProperty
-from io_utils import ImportHelper, ExportHelper
+from bpy_extras.io_utils import ImportHelper, ExportHelper
class ImportSVG(bpy.types.Operator, ImportHelper):
diff --git a/io_export_pc2.py b/io_export_pc2.py
index 53303fc4..f9170652 100644
--- a/io_export_pc2.py
+++ b/io_export_pc2.py
@@ -44,7 +44,7 @@ from bpy.props import *
import mathutils, math, struct
from os import remove
import time
-from io_utils import ExportHelper
+from bpy_extras.io_utils import ExportHelper
def getSampling(start, end, sampling):
samples = [start - sampling
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index c4191fc0..38c8efdc 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -35,7 +35,7 @@ bl_info = {
import bpy, os, mathutils
from bpy.props import *
from add_utils import *
-from io_utils import ImportHelper, load_image
+from bpy_extras.io_utils import ImportHelper, load_image
## GLOBAL VARS ##
EXT_LIST = {
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 38642390..e861fcf8 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -2617,7 +2617,7 @@ def writeDefaults():
DEBUG = False
from bpy.props import StringProperty, FloatProperty, EnumProperty, BoolProperty
-from io_utils import ImportHelper
+from bpy_extras.io_utils import ImportHelper
MhxBoolProps = [
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index eabfc54e..e8384923 100644
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@ -44,7 +44,7 @@ if "bpy" in locals():
import os
import bpy
from bpy.props import CollectionProperty, StringProperty, BoolProperty
-from io_utils import ImportHelper, ExportHelper
+from bpy_extras.io_utils import ImportHelper, ExportHelper
class ImportPLY(bpy.types.Operator, ImportHelper):
diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index fc87e66e..bd525065 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -207,7 +207,7 @@ import bpy
def load_ply(filepath):
import time
- from io_utils import load_image, unpack_list, unpack_face_list
+ from bpy_extras.io_utils import load_image, unpack_list, unpack_face_list
t = time.time()
obj_spec, obj = read(filepath)
diff --git a/io_mesh_raw/import_raw.py b/io_mesh_raw/import_raw.py
index eb772585..04724544 100644
--- a/io_mesh_raw/import_raw.py
+++ b/io_mesh_raw/import_raw.py
@@ -43,7 +43,7 @@ tolerance.
import bpy
# move those to a utility modul
-from io_utils import unpack_face_list, unpack_list # TODO, make generic
+from bpy_extras.io_utils import unpack_face_list, unpack_list # TODO, make generic
def readMesh(filename, objName):
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py
index 24e1650d..48c37af4 100644
--- a/io_mesh_stl/__init__.py
+++ b/io_mesh_stl/__init__.py
@@ -60,7 +60,7 @@ import os
import bpy
from bpy.props import StringProperty, BoolProperty, CollectionProperty
-from io_utils import ExportHelper, ImportHelper
+from bpy_extras.io_utils import ExportHelper, ImportHelper
class ImportSTL(bpy.types.Operator, ImportHelper):
diff --git a/io_scene_3ds/__init__.py b/io_scene_3ds/__init__.py
index 21bed64a..4915512a 100644
--- a/io_scene_3ds/__init__.py
+++ b/io_scene_3ds/__init__.py
@@ -43,7 +43,7 @@ if "bpy" in locals():
import bpy
from bpy.props import StringProperty, FloatProperty, BoolProperty
-from io_utils import ImportHelper, ExportHelper
+from bpy_extras.io_utils import ImportHelper, ExportHelper
class Import3DS(bpy.types.Operator, ImportHelper):
diff --git a/io_scene_3ds/export_3ds.py b/io_scene_3ds/export_3ds.py
index bf7bd990..8def27b1 100644
--- a/io_scene_3ds/export_3ds.py
+++ b/io_scene_3ds/export_3ds.py
@@ -893,8 +893,7 @@ def save(operator, context, filepath="",
import bpy
import time
- import io_utils
- from io_utils import create_derived_objects, free_derived_objects
+ from bpy_extras.io_utils import create_derived_objects, free_derived_objects
'''Save the Blender scene to a 3ds file.'''
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py
index 1aea6384..d66ace47 100644
--- a/io_scene_3ds/import_3ds.py
+++ b/io_scene_3ds/import_3ds.py
@@ -25,7 +25,7 @@ import os
import time
import struct
-from io_utils import load_image
+from bpy_extras.io_utils import load_image
import bpy
import mathutils
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 33651d2a..dafc4e15 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -41,8 +41,7 @@ if "bpy" in locals():
import bpy
from bpy.props import StringProperty, BoolProperty, FloatProperty, EnumProperty
-import io_utils
-from io_utils import ExportHelper
+from bpy_extras.io_utils import ExportHelper, path_reference_mode, axis_conversion
class ExportFBX(bpy.types.Operator, ExportHelper):
@@ -61,15 +60,28 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
# EXP_OBS_SCENE = BoolProperty(name="Scene Objects", description="Export all objects in this scene", default=True)
global_scale = FloatProperty(name="Scale", description="Scale all data, (Note! some imports dont support scaled armatures)", min=0.01, max=1000.0, soft_min=0.01, soft_max=1000.0, default=1.0)
- global_rotate = EnumProperty(
- name="Rotate",
- options={'ENUM_FLAG'},
- items=(('X_90', "X 90", ""),
- ('Y_90', "Y 90", ""),
- ('Z_90', "Z 90", ""),
+ global_axis_forward = EnumProperty(
+ name="Forward",
+ items=(('X', "X Forward", ""),
+ ('Y', "Y Forward", ""),
+ ('Z', "Z Forward", ""),
+ ('-X', "-X Forward", ""),
+ ('-Y', "-Y Forward", ""),
+ ('-Z', "-Z Forward", ""),
+ ),
+ default='Y',
+ )
+
+ global_axis_up = EnumProperty(
+ name="Up",
+ items=(('X', "X Up", ""),
+ ('Y', "Y Up", ""),
+ ('Z', "Z Up", ""),
+ ('-X', "-X Up", ""),
+ ('-Y', "-Y Up", ""),
+ ('-Z', "-Z Up", ""),
),
- default={'X_90'},
- description="Global rotation to apply to the exported scene",
+ default='Z',
)
object_types = EnumProperty(
@@ -84,7 +96,7 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH'},
)
- mesh_apply_modifiers = BoolProperty(name="Modifiers", description="Apply modifiers to mesh objects", default=True)
+ mesh_apply_modifiers = BoolProperty(name="Apply Modifiers", description="Apply modifiers to mesh objects", default=True)
mesh_smooth_type = EnumProperty(
name="Smoothing",
@@ -114,7 +126,7 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
BATCH_OWN_DIR = BoolProperty(name="Own Dir", description="Create a dir for each exported file", default=True)
use_metadata = BoolProperty(name="Use Metadata", default=True, options={'HIDDEN'})
- path_mode = io_utils.path_reference_mode
+ path_mode = path_reference_mode
@property
def check_extension(self):
@@ -126,22 +138,13 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
if not self.filepath:
raise Exception("filepath not set")
- mtx4_x90n = Matrix.Rotation(-math.pi / 2.0, 4, 'X')
- mtx4_y90n = Matrix.Rotation(-math.pi / 2.0, 4, 'Y')
- mtx4_z90n = Matrix.Rotation(-math.pi / 2.0, 4, 'Z')
-
GLOBAL_MATRIX = Matrix()
GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.global_scale
- if 'X_90' in self.global_rotate:
- GLOBAL_MATRIX = mtx4_x90n * GLOBAL_MATRIX
- if 'Y_90' in self.global_rotate:
- GLOBAL_MATRIX = mtx4_y90n * GLOBAL_MATRIX
- if 'Z_90' in self.global_rotate:
- GLOBAL_MATRIX = mtx4_z90n * GLOBAL_MATRIX
-
- keywords = self.as_keywords(ignore=("global_rotate", "global_scale", "check_existing", "filter_glob"))
- keywords["GLOBAL_MATRIX"] = GLOBAL_MATRIX
+ GLOBAL_MATRIX = GLOBAL_MATRIX * axis_conversion(to_forward=self.global_axis_forward, to_up=self.global_axis_up).to_4x4()
+ keywords = self.as_keywords(ignore=("global_axis_forward", "global_axis_up", "global_scale", "check_existing", "filter_glob"))
+ keywords["GLOBAL_MATRIX"] = GLOBAL_MATRIX
+ print(GLOBAL_MATRIX)
from . import export_fbx
return export_fbx.save(self, context, **keywords)
diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py
index 47bbb178..16789bf9 100644
--- a/io_scene_fbx/export_fbx.py
+++ b/io_scene_fbx/export_fbx.py
@@ -214,7 +214,7 @@ def save_single(operator, scene, filepath="",
path_mode='AUTO',
):
- import io_utils
+ import bpy_extras.io_utils
mtx_x90 = Matrix.Rotation(math.pi / 2.0, 3, 'X')
mtx4_z90 = Matrix.Rotation(math.pi / 2.0, 4, 'Z')
@@ -1097,7 +1097,7 @@ def save_single(operator, scene, filepath="",
Property: "Width", "int", "",0
Property: "Height", "int", "",0''')
if tex:
- fname_rel = 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)
fname_strip = os.path.basename(fname_rel)
else:
fname_strip = fname_rel = ""
@@ -1156,7 +1156,7 @@ def save_single(operator, scene, filepath="",
file.write('\n\t\tMedia: "Video::%s"' % texname)
if tex:
- fname_rel = 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)
fname_strip = os.path.basename(fname_rel)
else:
fname_strip = fname_rel = ""
@@ -2747,7 +2747,7 @@ Takes: {''')
file.close()
# copy all collected files.
- io_utils.path_reference_copy(copy_set)
+ bpy_extras.io_utils.path_reference_copy(copy_set)
print('export finished in %.4f sec.' % (time.clock() - start_time))
return {'FINISHED'}
diff --git a/io_scene_m3/__init__.py b/io_scene_m3/__init__.py
index cde21f58..78c2498d 100644
--- a/io_scene_m3/__init__.py
+++ b/io_scene_m3/__init__.py
@@ -47,7 +47,7 @@ import time
import datetime
import bpy
from bpy.props import StringProperty, BoolProperty
-from io_utils import ImportHelper, ExportHelper
+from bpy_extras.io_utils import ImportHelper, ExportHelper
class ImportM3(bpy.types.Operator, ImportHelper):
diff --git a/io_scene_m3/import_m3.py b/io_scene_m3/import_m3.py
index ec0a635f..a3e42e70 100644
--- a/io_scene_m3/import_m3.py
+++ b/io_scene_m3/import_m3.py
@@ -56,7 +56,7 @@ import mathutils
import struct
import os.path
from bpy.props import *
-from io_utils import load_image
+from bpy_extras.io_utils import load_image
##################
## Struct setup ##
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):
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py
index f3b6dad6..9da01735 100644
--- a/io_scene_x3d/__init__.py
+++ b/io_scene_x3d/__init__.py
@@ -41,7 +41,7 @@ if "bpy" in locals():
import bpy
from bpy.props import StringProperty, BoolProperty
-from io_utils import ImportHelper, ExportHelper
+from bpy_extras.io_utils import ImportHelper, ExportHelper
class ImportX3D(bpy.types.Operator, ImportHelper):
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index 94bb3bd5..391f8ec3 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -39,7 +39,7 @@ import os
import bpy
import mathutils
-from io_utils import create_derived_objects, free_derived_objects
+from bpy_extras.io_utils import create_derived_objects, free_derived_objects
def round_color(col, cp):
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index fe8a1589..9a20db26 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -1432,7 +1432,7 @@ for i, f in enumerate(files):
# NO BLENDER CODE ABOVE THIS LINE.
# -----------------------------------------------------------------------------------
import bpy
-import image_utils
+from bpy_extras import image_utils
# import BPyImage
# import BPySys
# reload(BPySys)
diff --git a/io_shape_mdd/__init__.py b/io_shape_mdd/__init__.py
index be9334ad..bc195735 100644
--- a/io_shape_mdd/__init__.py
+++ b/io_shape_mdd/__init__.py
@@ -43,7 +43,7 @@ if "bpy" in locals():
import bpy
from bpy.props import StringProperty, IntProperty
-from io_utils import ExportHelper, ImportHelper
+from bpy_extras.io_utils import ExportHelper, ImportHelper
class ImportMDD(bpy.types.Operator, ImportHelper):
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index 0b74e863..954e5cf1 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -655,7 +655,7 @@ class GenerateCloud(bpy.types.Operator):
cldPntsModifiers[0].name = "CloudPnts"
cldPntsModifiers[0].texture = cloudtex
cldPntsModifiers[0].texture_coords = 'OBJECT'
- cldPntsModifiers[0].texture_coordinate_object = cloud
+ cldPntsModifiers[0].texture_coords_object = cloud
cldPntsModifiers[0].strength = -1.4
# Apply modifier
diff --git a/system_demo_mode/__init__.py b/system_demo_mode/__init__.py
index cc568c11..902ed37b 100644
--- a/system_demo_mode/__init__.py
+++ b/system_demo_mode/__init__.py
@@ -41,7 +41,7 @@ if "bpy" in locals():
import bpy
from bpy.props import StringProperty, BoolProperty, IntProperty, FloatProperty, EnumProperty
-from io_utils import ImportHelper
+from bpy_extras.io_utils import ImportHelper
class DemoModeSetup(bpy.types.Operator):
diff --git a/texture_paint_layer_manager.py b/texture_paint_layer_manager.py
index b3f2d088..bff56c3d 100644
--- a/texture_paint_layer_manager.py
+++ b/texture_paint_layer_manager.py
@@ -15,7 +15,7 @@ bl_info = {
import bpy
from bpy.props import*
import os
-from io_utils import ImportHelper
+from bpy_extras.io_utils import ImportHelper
#-------------------------------------------