From d1228ea8d8279c736871b94e71cb81fbf73ea2c6 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Sat, 10 Sep 2011 04:12:48 +0000
Subject: [PATCH] cleanup unused vars

---
 add_curve_ivygen.py        |  3 +--
 io_scene_3ds/export_3ds.py |  1 -
 io_scene_x3d/import_x3d.py | 16 +++++-----------
 mocap/__init__.py          |  8 ++------
 mocap/retarget.py          |  2 +-
 5 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/add_curve_ivygen.py b/add_curve_ivygen.py
index 49988fadb..99f9e563b 100644
--- a/add_curve_ivygen.py
+++ b/add_curve_ivygen.py
@@ -189,7 +189,7 @@ def createIvyGeometry(IVY, growLeaves):
         ob = bpy.data.objects.new('IvyLeaf', me)
         bpy.context.scene.objects.link(ob)
 
-        tex = me.uv_textures.new("Leaves")
+        me.uv_textures.new("Leaves")
 
         # Set the uv texture coords
         # TODO, this is non-functional, default uvs are ok?
@@ -565,7 +565,6 @@ class IvyGen(bpy.types.Operator):
         # Generate first root and node
         IVY.seed(seedPoint)
 
-        checkAlive = True
         checkTime = False
         maxLength = self.maxIvyLength  # * radius
 
diff --git a/io_scene_3ds/export_3ds.py b/io_scene_3ds/export_3ds.py
index c39bd0db3..fc8d7117e 100644
--- a/io_scene_3ds/export_3ds.py
+++ b/io_scene_3ds/export_3ds.py
@@ -447,7 +447,6 @@ def make_material_texture_chunk(id, images):
     mat_sub = _3ds_chunk(id)
 
     def add_image(img):
-        import os
         import bpy
         filename = bpy.path.basename(image.filepath)
         mat_sub_file = _3ds_chunk(MATMAPFILE)
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index 1ee0e9f5b..7ae4bb091 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -1223,19 +1223,13 @@ class vrmlNode(object):
 
 
 def gzipOpen(path):
-    try:
-        import gzip
-    except:
-        gzip = None
+    import gzip
 
     data = None
-    if gzip:
-        try:
-            data = gzip.open(path, 'r').read()
-        except:
-            pass
-    else:
-        print('\tNote, gzip module could not be imported, compressed files will fail to load')
+    try:
+        data = gzip.open(path, 'r').read()
+    except:
+        pass
 
     if data is None:
         try:
diff --git a/mocap/__init__.py b/mocap/__init__.py
index 5a2405e44..55d8bdb74 100644
--- a/mocap/__init__.py
+++ b/mocap/__init__.py
@@ -182,7 +182,7 @@ def toggleIKBone(self, context):
                 chainLen += 1
                 if hasIKConstraint(parent_bone):
                     break
-                deformer_children = [child for child in parent_bone.children if child.bone.use_deform]
+                #~ deformer_children = [child for child in parent_bone.children if child.bone.use_deform]
                 #~ if len(deformer_children) > 1:
                     #~ break
             ik.chain_count = chainLen
@@ -575,10 +575,6 @@ class OBJECT_OT_DenoiseButton(bpy.types.Operator):
         mocap_tools.denoise_median()
         return {"FINISHED"}
 
-    @classmethod
-    def poll(cls, context):
-        return context.active_object
-
     @classmethod
     def poll(cls, context):
         return context.active_object.animation_data
@@ -879,7 +875,7 @@ def register():
     #Advanced retargeting boolean property
     bpy.types.Armature.advancedRetarget = BoolProperty(default=False, update=advancedRetargetToggle)
     #frame step - frequency of frames to retarget. Skipping is useful for previewing, faster work etc.
-    bpy.types.Armature.frameStep = smooth_out = IntProperty(name="Frame Skip",
+    bpy.types.Armature.frameStep = IntProperty(name="Frame Skip",
             default=1,
             description="Amount of frames to skip - for previewing retargets quickly. 1 is fully sampled",
             min=1)
diff --git a/mocap/retarget.py b/mocap/retarget.py
index f79810fdd..f59912004 100644
--- a/mocap/retarget.py
+++ b/mocap/retarget.py
@@ -20,7 +20,7 @@
 
 import bpy
 from mathutils import Vector, Matrix
-from math import radians, acos, pi
+from math import radians
 from bl_operators import nla
 
 
-- 
GitLab