bugfix [#26094] Going to Bone Roll menu brings up python error

also correct for pep8 warnings.
This commit is contained in:
Campbell Barton 2011-02-16 02:25:03 +00:00
parent 78c135d93e
commit fee5363912
15 changed files with 38 additions and 44 deletions

View File

@ -62,11 +62,6 @@ def source_list(path, filename_check=None):
# extension checking # extension checking
def is_c_header(filename):
ext = splitext(filename)[1]
return (ext in (".h", ".hpp", ".hxx"))
def is_cmake(filename): def is_cmake(filename):
ext = splitext(filename)[1] ext = splitext(filename)[1]
return (ext == ".cmake") or (filename == "CMakeLists.txt") return (ext == ".cmake") or (filename == "CMakeLists.txt")

View File

@ -25,5 +25,3 @@ for image in bpy.data.images:
file.write("%s %dx%d\n" % (image.filepath, image.size[0], image.size[1])) file.write("%s %dx%d\n" % (image.filepath, image.size[0], image.size[1]))
file.close() file.close()

View File

@ -78,6 +78,7 @@ class DiscontFilterOp(bpy.types.Operator):
main(context) main(context)
return {'FINISHED'} return {'FINISHED'}
def register(): def register():
bpy.utils.register_module(__name__) bpy.utils.register_module(__name__)

View File

@ -387,6 +387,7 @@ class WM_OT_context_cycle_array(bpy.types.Operator):
class WM_MT_context_menu_enum(bpy.types.Menu): class WM_MT_context_menu_enum(bpy.types.Menu):
bl_label = "" bl_label = ""
data_path = "" # BAD DESIGN, set from operator below. data_path = "" # BAD DESIGN, set from operator below.
def draw(self, context): def draw(self, context):
data_path = self.data_path data_path = self.data_path
value = context_path_validate(bpy.context, data_path) value = context_path_validate(bpy.context, data_path)

View File

@ -98,7 +98,6 @@ class NLA_MT_select(bpy.types.Menu):
layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT' layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT'
class NLA_MT_marker(bpy.types.Menu): class NLA_MT_marker(bpy.types.Menu):
bl_label = "Marker" bl_label = "Marker"

View File

@ -638,8 +638,8 @@ class USERPREF_PT_theme(bpy.types.Panel):
elif theme.theme_area == 'COLOR_SETS': elif theme.theme_area == 'COLOR_SETS':
col = split.column() col = split.column()
for i,ui in enumerate(theme.bone_color_sets): for i, ui in enumerate(theme.bone_color_sets):
col.label(text="Color Set %d:" % (i+1)) # i starts from 0 col.label(text="Color Set %d:" % (i + 1)) # i starts from 0
row = col.row() row = col.row()

View File

@ -1935,8 +1935,7 @@ class VIEW3D_MT_edit_armature_roll(bpy.types.Menu):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.operator("armature.calculate_roll", text="Recalculate with Z-Axis Up").type = 'GLOBALUP' layout.operator_menu_enum("armature.calculate_roll", "type")
layout.operator("armature.calculate_roll", text="Recalculate with Z-Axis to Cursor").type = 'CURSOR'
layout.separator() layout.separator()

View File

@ -39,6 +39,7 @@ Example Usage:
import os import os
import sys import sys
def clear_scene(): def clear_scene():
import bpy import bpy
unique_obs = set() unique_obs = set()