style cleanup: pep8

This commit is contained in:
Campbell Barton 2012-05-15 18:50:51 +00:00
parent e79c29a1d6
commit eb22b52482
9 changed files with 26 additions and 27 deletions

@ -121,12 +121,14 @@ class SaveDirty(Operator):
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:

@ -129,9 +129,6 @@ class AddPresetBase():
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)

@ -35,7 +35,7 @@ class MotionPathButtonsPanel():
layout = self.layout
mps = avs.motion_path
# Display Range
layout.prop(mps, "type", expand=True)
@ -50,21 +50,21 @@ class MotionPathButtonsPanel():
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 @@ class MotionPathButtonsPanel():
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()

@ -305,10 +305,10 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
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)

@ -301,7 +301,7 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
ob = context.object
avs = ob.animation_visualisation
mpath = ob.motion_path
self.draw_settings(context, avs, mpath)

@ -101,6 +101,7 @@ class CLIP_PT_clip_view_panel:
return clip and sc.view == 'CLIP'
class CLIP_PT_tracking_panel:
@classmethod

@ -277,7 +277,7 @@ class TEXT_MT_edit(Menu):
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'

@ -83,7 +83,7 @@ class TIME_HT_header(Header):
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)

@ -93,7 +93,7 @@ class VIEW3D_HT_header(Header):
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 @@ class VIEW3D_MT_transform(VIEW3D_MT_transform_base):
def draw(self, context):
# base menu
VIEW3D_MT_transform_base.draw(self, context)
# generic...
layout = self.layout
layout.separator()
@ -178,16 +178,16 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base):
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 @@ class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base):
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 @@ class VIEW3D_MT_hide_mask(Menu):
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'