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_fbx/__init__.py | 1 - io_scene_fbx/export_fbx.py | 14 +++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'io_scene_fbx') diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 5da1956e..a805f713 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -133,7 +133,6 @@ class ExportFBX(bpy.types.Operator, ExportHelper): return self.batch_mode == 'OFF' def execute(self, context): - import math from mathutils import Matrix if not self.filepath: raise Exception("filepath not set") diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index 965941d9..83c0fab2 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -29,7 +29,6 @@ http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_fbx import os import time import math # math.pi -import shutil # for file copying import bpy from mathutils import Vector, Matrix @@ -937,7 +936,7 @@ def save_single(operator, scene, filepath="", do_light = not (light.use_only_shadow or (not light.use_diffuse and not light.use_specular)) do_shadow = (light.shadow_method in ('RAY_SHADOW', 'BUFFER_SHADOW')) - scale = abs(global_matrix.to_scale()[0]) # scale is always uniform in this case + # scale = abs(global_matrix.to_scale()[0]) # scale is always uniform in this case # UNUSED file.write('\n\t\t\tProperty: "LightType", "enum", "",%i' % light_type) file.write('\n\t\t\tProperty: "CastLightOnObject", "bool", "",1') @@ -1492,7 +1491,6 @@ def save_single(operator, scene, filepath="", uvlayers = [] if do_uvs: uvlayers = me.uv_textures - uvlayer_orig = me.uv_textures.active for uvindex, uvlayer in enumerate(me.uv_textures): file.write('\n\t\tLayerElementUV: %i {' % uvindex) file.write('\n\t\t\tVersion: 101') @@ -1611,8 +1609,6 @@ def save_single(operator, scene, filepath="", for j, mat_tex_pair in enumerate(my_mesh.blenMaterials): material_mapping_local[mat_tex_pair] = j - len_material_mapping_local = len(material_mapping_local) - mats = my_mesh.blenMaterialList if me.uv_textures.active: @@ -1768,7 +1764,7 @@ def save_single(operator, scene, filepath="", materials = {} # (mat, image) keys, should be a set() textures = {} # should be a set() - tmp_ob_type = ob_type = None # incase no objects are exported, so as not to raise an error + tmp_ob_type = None # incase no objects are exported, so as not to raise an error ## XXX @@ -2396,7 +2392,7 @@ Connections: {''') start = scene.frame_start end = scene.frame_end if end < start: - start, end = end, st + start, end = end, start # comment the following line, otherwise we dont get the pose # if start==end: ANIM_ENABLE = False @@ -2693,10 +2689,10 @@ Takes: {''') mist_intense = m.intensity mist_start = m.start mist_end = m.depth - mist_height = m.height + # mist_height = m.height # UNUSED world_hor = world.horizon_color else: - has_mist = mist_intense = mist_start = mist_end = mist_height = 0 + has_mist = mist_intense = mist_start = mist_end = 0 world_hor = 0, 0, 0 file.write('\n;Version 5 settings') -- cgit v1.2.3