[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34922] trunk/blender: pep8 cleanup and remove unused vars/imports
Campbell Barton
ideasman42 at gmail.com
Thu Feb 17 05:35:45 CET 2011
Revision: 34922
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34922
Author: campbellbarton
Date: 2011-02-17 04:35:41 +0000 (Thu, 17 Feb 2011)
Log Message:
-----------
pep8 cleanup and remove unused vars/imports
Modified Paths:
--------------
trunk/blender/build_files/cmake/cmake_consistency_check.py
trunk/blender/build_files/cmake/cmake_qtcreator_project.py
trunk/blender/release/datafiles/ctodata.py
trunk/blender/release/scripts/modules/bpy/utils.py
trunk/blender/release/scripts/modules/sys_info.py
trunk/blender/release/scripts/op/object.py
trunk/blender/release/scripts/ui/properties_data_armature.py
trunk/blender/release/scripts/ui/properties_data_mesh.py
trunk/blender/release/scripts/ui/properties_material.py
trunk/blender/release/scripts/ui/properties_object.py
trunk/blender/release/scripts/ui/properties_particle.py
trunk/blender/release/scripts/ui/properties_render.py
trunk/blender/release/scripts/ui/space_console.py
trunk/blender/release/scripts/ui/space_info.py
trunk/blender/release/scripts/ui/space_logic.py
trunk/blender/release/scripts/ui/space_sequencer.py
trunk/blender/release/scripts/ui/space_userpref.py
trunk/blender/release/scripts/ui/space_userpref_keymap.py
trunk/blender/release/scripts/ui/space_view3d.py
trunk/blender/release/scripts/ui/space_view3d_toolbar.py
Modified: trunk/blender/build_files/cmake/cmake_consistency_check.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_consistency_check.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/build_files/cmake/cmake_consistency_check.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -34,7 +34,7 @@
"/ik_glut_test/"
import os
-from os.path import join, dirname, normpath, abspath
+from os.path import join, dirname, normpath, abspath, splitext
base = join(os.path.dirname(__file__), "..", "..")
base = normpath(base)
@@ -45,10 +45,7 @@
global_h = set()
global_c = set()
-import os
-from os.path import splitext
-
def source_list(path, filename_check=None):
for dirpath, dirnames, filenames in os.walk(path):
Modified: trunk/blender/build_files/cmake/cmake_qtcreator_project.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -45,11 +45,6 @@
# extension checking
-def is_c_header(filename):
- ext = splitext(filename)[1]
- return (ext in (".h", ".hpp", ".hxx"))
-
-
def is_cmake(filename):
ext = splitext(filename)[1]
return (ext == ".cmake") or (filename == "CMakeLists.txt")
Modified: trunk/blender/release/datafiles/ctodata.py
===================================================================
--- trunk/blender/release/datafiles/ctodata.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/release/datafiles/ctodata.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -28,7 +28,6 @@
# <pep8 compliant>
import sys
-import os
if len(sys.argv) < 2:
sys.stdout.write("Usage: ctodata <c_file>\n")
Modified: trunk/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/utils.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/release/scripts/modules/bpy/utils.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -74,9 +74,6 @@
:return: all loaded modules.
:rtype: list
"""
- import traceback
- import time
-
modules = []
for mod_name, mod_path in _bpy.path.module_names(path):
Modified: trunk/blender/release/scripts/modules/sys_info.py
===================================================================
--- trunk/blender/release/scripts/modules/sys_info.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/release/scripts/modules/sys_info.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -50,8 +50,6 @@
def write_sysinfo(op):
output_filename = "system-info.txt"
- warnings = 0
- notices = 0
if output_filename in bpy.data.texts.keys():
output = bpy.data.texts[output_filename]
Modified: trunk/blender/release/scripts/op/object.py
===================================================================
--- trunk/blender/release/scripts/op/object.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/release/scripts/op/object.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -476,7 +476,6 @@
def _main(self, context):
from mathutils import Vector
- from math import sqrt
SCALE_FAC = 0.01
offset = 0.5 * SCALE_FAC
Modified: trunk/blender/release/scripts/ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_armature.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/release/scripts/ui/properties_data_armature.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -157,42 +157,42 @@
class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel):
bl_label = "Pose Library"
bl_options = {'DEFAULT_CLOSED'}
-
+
@classmethod
def poll(cls, context):
return (context.object and context.object.type == 'ARMATURE' and context.object.pose)
-
+
def draw(self, context):
layout = self.layout
-
+
ob = context.object
poselib = ob.pose_library
-
+
row = layout.row()
row.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
-
+
if poselib:
activePoseIndex = poselib.pose_markers.active_index
if poselib.pose_markers.active:
activePoseName = poselib.pose_markers.active.name
else:
activePoseName = ""
-
+
row = layout.row()
row.template_list(poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5)
-
+
col = row.column(align=True)
col.active = (poselib.library is None)
-
- # invoke should still be used for 'add', as it is needed to allow
+
+ # invoke should still be used for 'add', as it is needed to allow
# add/replace options to be used properly
col.operator("poselib.pose_add", icon='ZOOMIN', text="")
-
- col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so that menu doesn't need showing
+
+ col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so that menu doesn't need showing
col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = activePoseName
col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = activePoseIndex
-
+
row = layout.row()
row.operator("poselib.action_sanitise")
Modified: trunk/blender/release/scripts/ui/properties_data_mesh.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_mesh.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/release/scripts/ui/properties_data_mesh.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -283,7 +283,6 @@
@classmethod
def poll(cls, context):
ob = context.active_object
- rd = context.scene.render
return (context.mode == 'EDIT_MESH') and ob and ob.type == 'MESH'
Modified: trunk/blender/release/scripts/ui/properties_material.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_material.py 2011-02-17 01:24:52 UTC (rev 34921)
+++ trunk/blender/release/scripts/ui/properties_material.py 2011-02-17 04:35:41 UTC (rev 34922)
@@ -126,7 +126,7 @@
elif mat:
split.template_ID(space, "pin_id")
split.separator()
-
+
if mat:
layout.prop(mat, "type", expand=True)
if mat.use_nodes:
@@ -150,46 +150,46 @@
bl_label = "Render Pipeline Options"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-
+
@classmethod
def poll(cls, context):
mat = context.material
engine = context.scene.render.engine
return mat and (mat.type in ('SURFACE', 'WIRE', 'VOLUME')) and (engine in cls.COMPAT_ENGINES)
-
+
def draw(self, context):
layout = self. layout
-
+
mat = context.material
#split = layout.split()
- mat_type = mat.type in ('SURFACE', 'WIRE')
-
+ mat_type = mat.type in ('SURFACE', 'WIRE')
+
row = layout.row()
row.active = mat_type
row.prop(mat, "use_transparency")
sub = row.column()
sub.prop(mat, "offset_z")
sub.active = mat_type and mat.use_transparency and mat.transparency_method == 'Z_TRANSPARENCY'
-
+
row = layout.row()
row.active = mat.use_transparency or not mat_type
row.prop(mat, "transparency_method", expand=True)
-
- layout.separator()
-
+
+ layout.separator()
+
split = layout.split()
col = split.column()
-
- col.prop(mat, "use_raytrace") #
- col.prop(mat, "use_full_oversampling") #
+
+ col.prop(mat, "use_raytrace")
+ col.prop(mat, "use_full_oversampling")
sub = col.column()
sub.active = mat_type
sub.prop(mat, "use_sky")
sub.prop(mat, "invert_z")
-
+
col = split.column()
col.active = mat_type
-
+
col.prop(mat, "use_cast_shadows_only", text="Cast Only")
col.prop(mat, "shadow_cast_alpha", text="Casting Alpha")
col.prop(mat, "use_cast_buffer_shadows")
@@ -205,7 +205,7 @@
mat = context.material
engine = context.scene.render.engine
return check_material(mat) and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
-
+
def draw(self, context):
layout = self.layout
@@ -264,7 +264,7 @@
mat = context.material
engine = context.scene.render.engine
return check_material(mat) and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
-
+
def draw(self, context):
layout = self.layout
@@ -321,7 +321,7 @@
mat = context.material
engine = context.scene.render.engine
return check_material(mat) and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
-
+
def draw(self, context):
layout = self.layout
@@ -359,17 +359,17 @@
def draw(self, context):
layout = self.layout
-
+
base_mat = context.material
mat = active_node_mat(context.material)
rayt = mat.raytrace_transparency
-
+
split = layout.split()
col = split.column()
col.prop(mat, "alpha")
row = col.row()
- row.active = base_mat.use_transparency and (not mat.use_shadeless) #
+ row.active = base_mat.use_transparency and (not mat.use_shadeless)
row.prop(mat, "specular_alpha", text="Specular")
col = split.column()
@@ -413,7 +413,7 @@
def draw_header(self, context):
raym = active_node_mat(context.material).raytrace_mirror
-
+
self.layout.prop(raym, "use", text="")
def draw(self, context):
@@ -679,7 +679,7 @@
mat = context.material
engine = context.scene.render.engine
return check_material(mat) and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
-
+
def draw(self, context):
layout = self.layout
@@ -717,7 +717,7 @@
mat = context.material
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list