diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-10 21:28:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-10 21:28:53 +0400 |
commit | 8012053e1e178c8cabb133e05dc1e36d52908fa7 (patch) | |
tree | fd3f79b7e8cd9ee165ff2ece9a1ef9d2cf7ca058 /io_import_scene_unreal_psk.py | |
parent | 0507e7a5b8dd558e12c906dd398a6e0bd7f76911 (diff) |
cleanup
- remove unused imports
- remove/comment unused vars
- fix for some bugs with unused vars being used
Diffstat (limited to 'io_import_scene_unreal_psk.py')
-rw-r--r-- | io_import_scene_unreal_psk.py | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py index 5646af8b..edc7cd02 100644 --- a/io_import_scene_unreal_psk.py +++ b/io_import_scene_unreal_psk.py @@ -47,16 +47,11 @@ Imports a *psk file to a new mesh import bpy import mathutils -import os -import sys -import string import math -import re from string import * from struct import * from math import * from bpy.props import * -import mathutils bpy.types.Scene.unrealbonesize = FloatProperty( name="Bone Length", @@ -299,7 +294,6 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK,importmultiuvtextures): Bns = [] bone = [] - nobone = 0 #================================================================================================== # Bone Data #================================================================================================== @@ -369,16 +363,12 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK,importmultiuvtextures): #bpy.ops.object.mode_set(mode='OBJECT') meshname ="ArmObject" objectname = "armaturedata" - bfound = False - arm = None + # arm = None # UNUSED if importbone: - for obj in bpy.data.objects: - if (obj.name == meshname): - bfound = True - arm = obj - break - - if bfound == False: + obj = bpy.data.objects.get(meshname) + # arm = obj # UNUSED + + if obj: ''' armdata = bpy.data.armatures.new(objectname) ob_new = bpy.data.objects.new(meshname, armdata) @@ -603,7 +593,7 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK,importmultiuvtextures): print ("-- Creating UV Texture --") print ("-------------------------") texture = [] - texturename = "text1" + # texturename = "text1" # UNUSED countm = 0 #for countm in range(materialcount): #psktexname="psk" + str(countm) @@ -642,7 +632,7 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK,importmultiuvtextures): me_ob.update() #print("UV TEXTURE NAME:",uvtex.name) if (len(faceuv) > 0): - counttex = 0 + # counttex = 0 # UNUSED countm = 0 for countm in range(len(me_ob.uv_textures)): me_ob.update() |