[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24204] trunk/blender/release/scripts: made scripts pass the pep8 test (though not fully pep8 yet)
Campbell Barton
ideasman42 at gmail.com
Sun Nov 1 00:35:56 CET 2009
Revision: 24204
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24204
Author: campbellbarton
Date: 2009-11-01 00:35:56 +0100 (Sun, 01 Nov 2009)
Log Message:
-----------
made scripts pass the pep8 test (though not fully pep8 yet)
added comment in header to know if a script has been converted or not.
Modified Paths:
--------------
trunk/blender/release/scripts/modules/bpy_ops.py
trunk/blender/release/scripts/ui/properties_data_armature.py
trunk/blender/release/scripts/ui/properties_data_bone.py
trunk/blender/release/scripts/ui/properties_data_camera.py
trunk/blender/release/scripts/ui/properties_data_curve.py
trunk/blender/release/scripts/ui/properties_data_empty.py
trunk/blender/release/scripts/ui/properties_data_lamp.py
trunk/blender/release/scripts/ui/properties_data_lattice.py
trunk/blender/release/scripts/ui/properties_data_mesh.py
trunk/blender/release/scripts/ui/properties_data_metaball.py
trunk/blender/release/scripts/ui/properties_data_modifier.py
trunk/blender/release/scripts/ui/properties_data_text.py
trunk/blender/release/scripts/ui/properties_game.py
trunk/blender/release/scripts/ui/properties_material.py
trunk/blender/release/scripts/ui/properties_object.py
trunk/blender/release/scripts/ui/properties_object_constraint.py
trunk/blender/release/scripts/ui/properties_particle.py
trunk/blender/release/scripts/ui/properties_physics_cloth.py
trunk/blender/release/scripts/ui/properties_physics_common.py
trunk/blender/release/scripts/ui/properties_physics_field.py
trunk/blender/release/scripts/ui/properties_physics_fluid.py
trunk/blender/release/scripts/ui/properties_physics_smoke.py
trunk/blender/release/scripts/ui/properties_physics_softbody.py
trunk/blender/release/scripts/ui/properties_render.py
trunk/blender/release/scripts/ui/properties_scene.py
trunk/blender/release/scripts/ui/properties_texture.py
trunk/blender/release/scripts/ui/properties_world.py
trunk/blender/release/scripts/ui/space_buttons.py
trunk/blender/release/scripts/ui/space_console.py
trunk/blender/release/scripts/ui/space_filebrowser.py
trunk/blender/release/scripts/ui/space_image.py
trunk/blender/release/scripts/ui/space_info.py
trunk/blender/release/scripts/ui/space_logic.py
trunk/blender/release/scripts/ui/space_node.py
trunk/blender/release/scripts/ui/space_outliner.py
trunk/blender/release/scripts/ui/space_sequencer.py
trunk/blender/release/scripts/ui/space_text.py
trunk/blender/release/scripts/ui/space_time.py
trunk/blender/release/scripts/ui/space_userpref.py
trunk/blender/release/scripts/ui/space_view3d.py
trunk/blender/release/scripts/ui/space_view3d_toolbar.py
Modified: trunk/blender/release/scripts/modules/bpy_ops.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_ops.py 2009-10-31 20:16:59 UTC (rev 24203)
+++ trunk/blender/release/scripts/modules/bpy_ops.py 2009-10-31 23:35:56 UTC (rev 24204)
@@ -3,6 +3,8 @@
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
+# <pep8-80 compliant>
+
# for slightly faster access
from bpy.__ops__ import add as op_add
from bpy.__ops__ import remove as op_remove
Modified: trunk/blender/release/scripts/ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_armature.py 2009-10-31 20:16:59 UTC (rev 24203)
+++ trunk/blender/release/scripts/ui/properties_data_armature.py 2009-10-31 23:35:56 UTC (rev 24204)
@@ -3,9 +3,10 @@
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -14,6 +15,7 @@
def poll(self, context):
return context.armature
+
class DATA_PT_context_arm(DataButtonsPanel):
bl_label = ""
bl_show_header = False
@@ -34,6 +36,7 @@
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_skeleton(DataButtonsPanel):
bl_label = "Skeleton"
@@ -61,6 +64,7 @@
col.itemR(arm, "deform_quaternion", text="Quaternion")
col.itemR(arm, "deform_bbone_rest", text="B-Bones Rest")
+
class DATA_PT_display(DataButtonsPanel):
bl_label = "Display"
@@ -78,11 +82,12 @@
flow.itemR(arm, "draw_group_colors", text="Colors")
flow.itemR(arm, "delay_deform", text="Delay Refresh")
+
class DATA_PT_bone_groups(DataButtonsPanel):
bl_label = "Bone Groups"
def poll(self, context):
- return (context.object and context.object.type=='ARMATURE' and context.object.pose)
+ return (context.object and context.object.type == 'ARMATURE' and context.object.pose)
def draw(self, context):
layout = self.layout
@@ -101,11 +106,11 @@
group = pose.active_bone_group
if group:
col = layout.column()
- col.active= (ob.proxy == None)
+ col.active = (ob.proxy == None)
col.itemR(group, "name")
split = layout.split(0.5)
- split.active= (ob.proxy == None)
+ split.active = (ob.proxy == None)
split.itemR(group, "color_set")
if group.color_set:
split.template_triColorSet(group, "colors")
@@ -118,6 +123,7 @@
#row.itemO("object.bone_group_select", text="Select")
#row.itemO("object.bone_group_deselect", text="Deselect")
+
class DATA_PT_paths(DataButtonsPanel):
bl_label = "Paths"
@@ -154,6 +160,7 @@
row.itemO("pose.paths_calculate", text="Calculate Paths")
row.itemO("pose.paths_clear", text="Clear Paths")
+
class DATA_PT_ghost(DataButtonsPanel):
bl_label = "Ghost"
Modified: trunk/blender/release/scripts/ui/properties_data_bone.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_bone.py 2009-10-31 20:16:59 UTC (rev 24203)
+++ trunk/blender/release/scripts/ui/properties_data_bone.py 2009-10-31 23:35:56 UTC (rev 24204)
@@ -3,9 +3,10 @@
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class BoneButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -14,6 +15,7 @@
def poll(self, context):
return (context.bone or context.edit_bone)
+
class BONE_PT_context_bone(BoneButtonsPanel):
bl_label = ""
bl_show_header = False
@@ -29,6 +31,7 @@
row.itemL(text="", icon='ICON_BONE_DATA')
row.itemR(bone, "name", text="")
+
class BONE_PT_transform(BoneButtonsPanel):
bl_label = "Transform"
@@ -74,6 +77,7 @@
layout.itemR(pchan, "rotation_mode")
+
class BONE_PT_transform_locks(BoneButtonsPanel):
bl_label = "Transform Locks"
bl_default_closed = True
@@ -104,6 +108,7 @@
row.column().itemR(pchan, "lock_scale")
+
class BONE_PT_relations(BoneButtonsPanel):
bl_label = "Relations"
@@ -145,6 +150,7 @@
sub.itemR(bone, "hinge", text="Inherit Rotation")
sub.itemR(bone, "inherit_scale", text="Inherit Scale")
+
class BONE_PT_display(BoneButtonsPanel):
bl_label = "Display"
@@ -178,6 +184,7 @@
col.itemL(text="Custom Shape:")
col.itemR(pchan, "custom_shape", text="")
+
class BONE_PT_deform(BoneButtonsPanel):
bl_label = "Deform"
bl_default_closed = True
Modified: trunk/blender/release/scripts/ui/properties_data_camera.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_camera.py 2009-10-31 20:16:59 UTC (rev 24203)
+++ trunk/blender/release/scripts/ui/properties_data_camera.py 2009-10-31 23:35:56 UTC (rev 24204)
@@ -3,9 +3,10 @@
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -14,6 +15,7 @@
def poll(self, context):
return context.camera
+
class DATA_PT_context_camera(DataButtonsPanel):
bl_label = ""
bl_show_header = False
@@ -34,6 +36,7 @@
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_camera(DataButtonsPanel):
bl_label = "Lens"
@@ -75,6 +78,7 @@
row.itemR(cam, "dof_object", text="")
row.itemR(cam, "dof_distance", text="Distance")
+
class DATA_PT_camera_display(DataButtonsPanel):
bl_label = "Display"
Modified: trunk/blender/release/scripts/ui/properties_data_curve.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_curve.py 2009-10-31 20:16:59 UTC (rev 24203)
+++ trunk/blender/release/scripts/ui/properties_data_curve.py 2009-10-31 23:35:56 UTC (rev 24204)
@@ -3,9 +3,10 @@
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -14,21 +15,22 @@
def poll(self, context):
return (context.object and context.object.type in ('CURVE', 'SURFACE') and context.curve)
+
class DataButtonsPanelCurve(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
+ '''Same as above but for curves only'''
+
def poll(self, context):
return (context.object and context.object.type == 'CURVE' and context.curve)
+
class DataButtonsPanelActive(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
+ '''Same as above but for curves only'''
+
def poll(self, context):
curve = context.curve
return (curve and curve.active_spline)
+
class DATA_PT_context_curve(DataButtonsPanel):
bl_label = ""
bl_show_header = False
@@ -49,6 +51,7 @@
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_shape_curve(DataButtonsPanel):
bl_label = "Shape"
@@ -70,7 +73,7 @@
if not is_surf:
sub = col.column()
- sub.active = (curve.dimensions=='2D')
+ sub.active = (curve.dimensions == '2D')
sub.itemL(text="Caps:")
row = sub.row()
row.itemR(curve, "front")
@@ -92,7 +95,7 @@
sub.itemR(curve, "render_resolution_v", text="Render V")
# XXX - put somewhere nicer.
- row= layout.row()
+ row = layout.row()
row.itemR(curve, "twist_mode")
row.itemR(curve, "twist_smooth") # XXX - may not be kept
@@ -101,6 +104,7 @@
# col.itemL(text="NORMALS")
# col.itemR(curve, "vertex_normal_flip")
+
class DATA_PT_geometry_curve(DataButtonsPanel):
bl_label = "Geometry"
@@ -125,6 +129,7 @@
col.itemL(text="Bevel Object:")
col.itemR(curve, "bevel_object", text="")
+
class DATA_PT_pathanim(DataButtonsPanelCurve):
bl_label = "Path Animation"
@@ -151,6 +156,7 @@
col.itemR(curve, "use_radius")
col.itemR(curve, "use_time_offset", text="Offset Children")
+
class DATA_PT_active_spline(DataButtonsPanelActive):
bl_label = "Active Spline"
@@ -214,7 +220,7 @@
if not is_surf:
split = layout.split()
col = split.column()
- col.active = (curve.dimensions=='3D')
+ col.active = (curve.dimensions == '3D')
col.itemL(text="Interpolation:")
col.itemR(act_spline, "tilt_interpolation", text="Tilt")
Modified: trunk/blender/release/scripts/ui/properties_data_empty.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_empty.py 2009-10-31 20:16:59 UTC (rev 24203)
+++ trunk/blender/release/scripts/ui/properties_data_empty.py 2009-10-31 23:35:56 UTC (rev 24204)
@@ -3,9 +3,10 @@
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -14,6 +15,7 @@
def poll(self, context):
return (context.object and context.object.type == 'EMPTY')
+
class DATA_PT_empty(DataButtonsPanel):
bl_label = "Empty"
Modified: trunk/blender/release/scripts/ui/properties_data_lamp.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_lamp.py 2009-10-31 20:16:59 UTC (rev 24203)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list