[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46676] trunk/blender/release/scripts/ startup: style cleanup: pep8
Campbell Barton
ideasman42 at gmail.com
Tue May 15 20:50:51 CEST 2012
Revision: 46676
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46676
Author: campbellbarton
Date: 2012-05-15 18:50:51 +0000 (Tue, 15 May 2012)
Log Message:
-----------
style cleanup: pep8
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_operators/image.py
trunk/blender/release/scripts/startup/bl_operators/presets.py
trunk/blender/release/scripts/startup/bl_ui/properties_animviz.py
trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
trunk/blender/release/scripts/startup/bl_ui/properties_object.py
trunk/blender/release/scripts/startup/bl_ui/space_clip.py
trunk/blender/release/scripts/startup/bl_ui/space_text.py
trunk/blender/release/scripts/startup/bl_ui/space_time.py
trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
Modified: trunk/blender/release/scripts/startup/bl_operators/image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/image.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_operators/image.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -121,12 +121,14 @@
if image.packed_file:
if image.library:
self.report({'WARNING'},
- "Packed library image: %r from library %r can't be re-packed" %
+ "Packed library image: %r from library %r"
+ " can't be re-packed" %
(image.name, image.library.filepath))
else:
image.pack(as_png=True)
else:
- filepath = bpy.path.abspath(image.filepath, library=image.library)
+ filepath = bpy.path.abspath(image.filepath,
+ library=image.library)
if "\\" not in filepath and "/" not in filepath:
self.report({'WARNING'}, "Invalid path: " + filepath)
elif filepath in unique_paths:
Modified: trunk/blender/release/scripts/startup/bl_operators/presets.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/presets.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_operators/presets.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -129,9 +129,6 @@
value = eval(rna_path)
rna_recursive_attr_expand(value, rna_path, 1)
-
-
-
file_preset.close()
preset_menu_class.bl_label = bpy.path.display_name(filename)
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_animviz.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_animviz.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_animviz.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -35,7 +35,7 @@
layout = self.layout
mps = avs.motion_path
-
+
# Display Range
layout.prop(mps, "type", expand=True)
@@ -50,21 +50,21 @@
elif (mps.type == 'RANGE'):
sub.prop(mps, "frame_start", text="Start")
sub.prop(mps, "frame_end", text="End")
-
+
sub.prop(mps, "frame_step", text="Step")
-
+
col = split.column()
if bones:
col.label(text="Cache for Bone:")
else:
col.label(text="Cache:")
-
+
if mpath:
sub = col.column(align=True)
sub.enabled = False
sub.prop(mpath, "frame_start", text="From")
sub.prop(mpath, "frame_end", text="To")
-
+
if bones:
col.operator("pose.paths_update", text="Update Paths", icon='BONE_DATA')
else:
@@ -72,15 +72,14 @@
else:
col.label(text="Not available yet...", icon='ERROR')
col.label(text="Calculate Paths first", icon='INFO')
-
-
+
# Display Settings
split = layout.split()
-
+
col = split.column()
col.label(text="Show:")
col.prop(mps, "show_frame_numbers", text="Frame Numbers")
-
+
col = split.column()
col.prop(mps, "show_keyframe_highlight", text="Keyframes")
sub = col.column()
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -305,10 +305,10 @@
ob = context.object
avs = ob.pose.animation_visualisation
-
+
pchan = context.active_pose_bone
mpath = pchan.motion_path if pchan else None
-
+
self.draw_settings(context, avs, mpath, bones=True)
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_object.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_object.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_object.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -301,7 +301,7 @@
ob = context.object
avs = ob.animation_visualisation
mpath = ob.motion_path
-
+
self.draw_settings(context, avs, mpath)
Modified: trunk/blender/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_clip.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_ui/space_clip.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -101,6 +101,7 @@
return clip and sc.view == 'CLIP'
+
class CLIP_PT_tracking_panel:
@classmethod
Modified: trunk/blender/release/scripts/startup/bl_ui/space_text.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_text.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_ui/space_text.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -277,7 +277,7 @@
layout.separator()
- layout.operator("text.move_lines",
+ layout.operator("text.move_lines",
text="Move line(s) up").direction = 'UP'
layout.operator("text.move_lines",
text="Move line(s) down").direction = 'DOWN'
Modified: trunk/blender/release/scripts/startup/bl_ui/space_time.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_time.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_ui/space_time.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -83,7 +83,7 @@
row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
if toolsettings.use_keyframe_insert_auto:
row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
-
+
if screen.is_animation_playing:
subsub = row.row()
subsub.prop(toolsettings, "use_record_with_nla", toggle=True)
Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2012-05-15 18:45:20 UTC (rev 46675)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2012-05-15 18:50:51 UTC (rev 46676)
@@ -93,7 +93,7 @@
if snap_element != 'INCREMENT':
row.prop(toolsettings, "snap_target", text="")
if obj:
- if obj.mode in {'OBJECT','POSE'} and snap_element != 'VOLUME':
+ if obj.mode in {'OBJECT', 'POSE'} and snap_element != 'VOLUME':
row.prop(toolsettings, "use_snap_align_rotation", text="")
elif obj.mode == 'EDIT':
row.prop(toolsettings, "use_snap_self", text="")
@@ -164,7 +164,7 @@
def draw(self, context):
# base menu
VIEW3D_MT_transform_base.draw(self, context)
-
+
# generic...
layout = self.layout
layout.separator()
@@ -178,16 +178,16 @@
def draw(self, context):
# base menu
VIEW3D_MT_transform_base.draw(self, context)
-
+
# object-specific option follow...
layout = self.layout
layout.separator()
layout.operator("transform.translate", text="Move Texture Space").texture_space = True
layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
-
+
layout.separator()
-
+
layout.operator_context = 'EXEC_REGION_WIN'
layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
@@ -214,13 +214,13 @@
def draw(self, context):
# base menu
VIEW3D_MT_transform_base.draw(self, context)
-
+
# armature specific extensions follow...
layout = self.layout
layout.separator()
obj = context.object
- if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
+ if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
@@ -1288,7 +1288,7 @@
op = layout.operator("paint.hide_show", text="Show Bounding Box")
op.action = 'SHOW'
op.area = 'INSIDE'
-
+
op = layout.operator("paint.hide_show", text="Hide Masked")
op.area = 'MASKED'
op.action = 'HIDE'
More information about the Bf-blender-cvs
mailing list