From 5d47c3aa6c91c5c9eed71349411ab7a367fe6d35 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Sat, 28 May 2011 09:35:49 +0000 Subject: [PATCH] update for changes in blenders api --- io_anim_bvh/export_bvh.py | 9 ++++++++- io_import_images_as_planes.py | 3 ++- io_mesh_ply/import_ply.py | 3 ++- io_scene_3ds/import_3ds.py | 4 ++-- io_scene_m3/import_m3.py | 2 +- io_scene_obj/import_obj.py | 4 ++-- io_scene_x3d/import_x3d.py | 2 +- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/io_anim_bvh/export_bvh.py b/io_anim_bvh/export_bvh.py index 6d36e587e..851eb1cc4 100644 --- a/io_anim_bvh/export_bvh.py +++ b/io_anim_bvh/export_bvh.py @@ -23,7 +23,14 @@ import bpy -def write_armature(context, filepath, frame_start, frame_end, global_scale=1.0, rotate_mode="NATIVE"): + +def write_armature(context, + filepath, + frame_start, + frame_end, + global_scale=1.0, + rotate_mode='NATIVE', + ): def ensure_rot_order(rot_order_str): if set(rot_order_str) != {'X', 'Y', 'Z'}: diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py index 38c8efdc3..4ede9e93d 100644 --- a/io_import_images_as_planes.py +++ b/io_import_images_as_planes.py @@ -35,7 +35,8 @@ bl_info = { import bpy, os, mathutils from bpy.props import * from add_utils import * -from bpy_extras.io_utils import ImportHelper, load_image +from bpy_extras.io_utils import ImportHelper +from bpy_extras.image_utils import load_image ## GLOBAL VARS ## EXT_LIST = { diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py index bd5250650..0f1789d98 100644 --- a/io_mesh_ply/import_ply.py +++ b/io_mesh_ply/import_ply.py @@ -207,7 +207,8 @@ import bpy def load_ply(filepath): import time - from bpy_extras.io_utils import load_image, unpack_list, unpack_face_list + from bpy_extras.io_utils import unpack_list, unpack_face_list + from bpy_extras.image_utils import load_image t = time.time() obj_spec, obj = read(filepath) diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py index 967ad2e92..803b8e53e 100644 --- a/io_scene_3ds/import_3ds.py +++ b/io_scene_3ds/import_3ds.py @@ -25,8 +25,6 @@ import os import time import struct -from bpy_extras.io_utils import load_image - import bpy import mathutils @@ -240,6 +238,8 @@ def add_texture_to_material(image, texture, material, mapto): def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH): + from bpy_extras.image_utils import load_image + #print previous_chunk.bytes_read, 'BYTES READ' contextObName = None contextLamp = [None, None] # object, Data diff --git a/io_scene_m3/import_m3.py b/io_scene_m3/import_m3.py index a3e42e70f..402128da2 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 bpy_extras.io_utils import load_image +from bpy_extras.image_utils import load_image ################## ## Struct setup ## diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index edc17fdad..697c65086 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -35,8 +35,8 @@ import os import time import bpy import mathutils -from mathutils.geometry import tesselate_polygon -from bpy_extras.io_utils import load_image, unpack_list, unpack_face_list +from bpy_extras.io_utils import unpack_list, unpack_face_list +from bpy_extras.image_utils import load_image def line_value(line_split): diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index 9fb40288e..d3ffbb8bc 100644 --- a/io_scene_x3d/import_x3d.py +++ b/io_scene_x3d/import_x3d.py @@ -948,7 +948,7 @@ class vrmlNode(object): urls.append(os.path.join(os.path.dirname(self.getFilename()), url)) urls.append(bpy.path.resolve_ncase(urls[-1])) - urls.append(os.path.join(os.path.dirname(self.getFilename()), os.path.basename(url))) + urls.append(os.path.join(os.path.dirname(self.getFilename()), os.path.basename(url))) urls.append(bpy.path.resolve_ncase(urls[-1])) try: -- GitLab