From 488e1da935d55330be55eb30b4605b993dd65dbd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 10 Jul 2011 22:57:27 +0000 Subject: cleanup - remove/comment unused variables - remove unused imports - fixed some bugs using incorrect variables --- io_scene_obj/__init__.py | 1 - io_scene_obj/export_obj.py | 5 ----- io_scene_obj/import_obj.py | 5 +---- 3 files changed, 1 insertion(+), 10 deletions(-) (limited to 'io_scene_obj') diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py index 660a38fc..694c618d 100644 --- a/io_scene_obj/__init__.py +++ b/io_scene_obj/__init__.py @@ -104,7 +104,6 @@ class ImportOBJ(bpy.types.Operator, ImportHelper): def execute(self, context): # print("Selected: " + context.active_object.name) from . import import_obj - from mathutils import Matrix if self.split_mode == 'OFF': self.use_split_objects = False diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index 594a4167..a6570907 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -20,7 +20,6 @@ import os import time -import shutil import bpy import mathutils @@ -239,9 +238,6 @@ def write_file(filepath, objects, scene, if EXPORT_GLOBAL_MATRIX is None: EXPORT_GLOBAL_MATRIX = mathutils.Matrix() - # XXX - import math - def veckey3d(v): return round(v.x, 6), round(v.y, 6), round(v.z, 6) @@ -273,7 +269,6 @@ def write_file(filepath, objects, scene, return '(null)' print('OBJ Export path: %r' % filepath) - temp_mesh_name = '~tmp-mesh' time1 = time.clock() # time1 = sys.time() diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index 697c6508..239e92ad 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -957,7 +957,7 @@ def load(operator, context, filepath, else: context_multi_line = b'' - isline = line.startswith(b'l') + # isline = line.startswith(b'l') # UNUSED for v in line_split: vert_loc_index = int(v) - 1 @@ -1143,6 +1143,3 @@ def load(operator, context, filepath, # replaced BPyImage.comprehensiveImageLoad with a simplified version that only checks additional directory specified, but doesn't search dirs recursively (obj_image_load) # bitmask won't work? - 132 # uses bpy.sys.time() - -if __name__ == "__main__": - register() -- cgit v1.2.3