diff options
-rw-r--r-- | build_files/cmake/cmake_consistency_check.py | 5 | ||||
-rw-r--r-- | doc/python_api/examples/bpy.data.py | 2 | ||||
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 2 | ||||
-rw-r--r-- | release/scripts/op/fcurve_euler_filter.py | 1 | ||||
-rw-r--r-- | release/scripts/op/wm.py | 5 | ||||
-rw-r--r-- | release/scripts/templates/panel_simple.py | 2 | ||||
-rw-r--r-- | release/scripts/ui/properties_data_armature.py | 26 | ||||
-rw-r--r-- | release/scripts/ui/properties_data_modifier.py | 2 | ||||
-rw-r--r-- | release/scripts/ui/properties_particle.py | 4 | ||||
-rw-r--r-- | release/scripts/ui/properties_physics_common.py | 2 | ||||
-rw-r--r-- | release/scripts/ui/properties_texture.py | 16 | ||||
-rw-r--r-- | release/scripts/ui/space_nla.py | 1 | ||||
-rw-r--r-- | release/scripts/ui/space_userpref.py | 10 | ||||
-rw-r--r-- | release/scripts/ui/space_view3d.py | 3 | ||||
-rw-r--r-- | source/tests/batch_import.py | 1 |
15 files changed, 38 insertions, 44 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py index 87bbc929a93..ec82d1b3b23 100644 --- a/build_files/cmake/cmake_consistency_check.py +++ b/build_files/cmake/cmake_consistency_check.py @@ -62,11 +62,6 @@ def source_list(path, filename_check=None): # 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") diff --git a/doc/python_api/examples/bpy.data.py b/doc/python_api/examples/bpy.data.py index fc1145a523f..555b421ddac 100644 --- a/doc/python_api/examples/bpy.data.py +++ b/doc/python_api/examples/bpy.data.py @@ -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.close() - - diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 68c14a75c5b..b383499e822 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -423,7 +423,7 @@ def pycontext2sphinx(BASEPATH): if len(type_map) > len(unique): raise Exception("Some types are not used: %s" % str([member for member in type_map if member not in unique])) else: - pass # will have raised an error above + pass # will have raised an error above def rna2sphinx(BASEPATH): diff --git a/release/scripts/op/fcurve_euler_filter.py b/release/scripts/op/fcurve_euler_filter.py index 6332bbe309c..b7d456dd525 100644 --- a/release/scripts/op/fcurve_euler_filter.py +++ b/release/scripts/op/fcurve_euler_filter.py @@ -78,6 +78,7 @@ class DiscontFilterOp(bpy.types.Operator): main(context) return {'FINISHED'} + def register(): bpy.utils.register_module(__name__) diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py index 0210dc912df..c6ab406c29d 100644 --- a/release/scripts/op/wm.py +++ b/release/scripts/op/wm.py @@ -387,6 +387,7 @@ class WM_OT_context_cycle_array(bpy.types.Operator): class WM_MT_context_menu_enum(bpy.types.Menu): bl_label = "" data_path = "" # BAD DESIGN, set from operator below. + def draw(self, context): data_path = self.data_path value = context_path_validate(bpy.context, data_path) @@ -394,7 +395,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu): return {'PASS_THROUGH'} base_path, prop_string = data_path.rsplit(".", 1) value_base = context_path_validate(context, base_path) - + values = [(i.name, i.identifier) for i in value_base.bl_rna.properties[prop_string].items] for name, identifier in values: @@ -408,7 +409,7 @@ class WM_OT_context_menu_enum(bpy.types.Operator): bl_label = "Context Enum Menu" bl_options = {'UNDO'} data_path = rna_path_prop - + def execute(self, context): data_path = self.data_path WM_MT_context_menu_enum.data_path = data_path diff --git a/release/scripts/templates/panel_simple.py b/release/scripts/templates/panel_simple.py index ddbd4eb7aa4..e5bf70cb654 100644 --- a/release/scripts/templates/panel_simple.py +++ b/release/scripts/templates/panel_simple.py @@ -26,7 +26,7 @@ def register(): def unregister(): - bpy.utils.unregister_class(OBJECT_PT_hello) + bpy.utils.unregister_class(OBJECT_PT_hello) if __name__ == "__main__": diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 793b75d6d5a..4efb49ac6a8 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -157,20 +157,20 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, bpy.types.Panel): 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 len(poselib.pose_markers): @@ -179,23 +179,23 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel): else: activePose = None activePoseName = None - + 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_context = 'EXEC_DEFAULT' # exec not invoke, so modal preview loop doesn't run col.operator("poselib.browse_interactive", icon='ZOOM_SELECTED', text="").pose_index = activePoseIndex - + # TODO: "validate action" operator to be restored diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index e93b34fe055..564963130ac 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -383,7 +383,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col.prop(md, "use_mirror_v", text="V") col = layout.column() - + if md.use_mirror_merge == True: col.prop(md, "merge_threshold") col.label(text="Mirror Object:") diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index 4b470831716..b48e354f526 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -823,7 +823,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel): elif part.render_type == 'BILLBOARD': ob = context.object - + sub.label(text="Align:") row = layout.row() @@ -850,7 +850,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel): col = layout.column() col.active = part.billboard_uv_split > 1 col.prop_search(psys, "billboard_split_uv", ob.data, "uv_textures") - + row = col.row() row.label(text="Animate:") row.prop(part, "billboard_animation", text="") diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py index e462bd958f7..c16a0df0167 100644 --- a/release/scripts/ui/properties_physics_common.py +++ b/release/scripts/ui/properties_physics_common.py @@ -274,7 +274,7 @@ def basic_force_field_falloff_ui(self, context, field): sub = row.row() sub.active = field.use_min_distance sub.prop(field, "distance_min", text="Minimum") - + col = split.column() row = col.row(align=True) row.prop(field, "use_max_distance", text="") diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index ac3fc2d0b1d..8b652ba6e60 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -62,10 +62,10 @@ def context_tex_datablock(context): idblock = context.brush if idblock: return idblock - + if context.particle_system: idblock = context.particle_system.settings - + return idblock @@ -991,7 +991,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): factor_but(col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down") elif isinstance(idblock, bpy.types.ParticleSettings): split = layout.split() - + col = split.column() col.label(text="General:") factor_but(col, "use_map_time", "time_factor", "Time") @@ -1005,21 +1005,21 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): factor_but(col, "use_map_damp", "damp_factor", "Damp") factor_but(col, "use_map_gravity", "gravity_factor", "Gravity") factor_but(col, "use_map_field", "field_factor", "Force Fields") - + layout.label(text="Hair:") - + split = layout.split() - + col = split.column() factor_but(col, "use_map_length", "length_factor", "Length") factor_but(col, "use_map_clump", "clump_factor", "Clump") - + col = split.column() factor_but(col, "use_map_kink", "kink_factor", "Kink") factor_but(col, "use_map_rough", "rough_factor", "Rough") layout.separator() - + if not isinstance(idblock, bpy.types.ParticleSettings): split = layout.split() diff --git a/release/scripts/ui/space_nla.py b/release/scripts/ui/space_nla.py index 3ebd8b1661e..7388a839d6d 100644 --- a/release/scripts/ui/space_nla.py +++ b/release/scripts/ui/space_nla.py @@ -98,7 +98,6 @@ class NLA_MT_select(bpy.types.Menu): layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT' - class NLA_MT_marker(bpy.types.Menu): bl_label = "Marker" diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 3f03647855c..e8d80f79ad8 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -638,11 +638,11 @@ class USERPREF_PT_theme(bpy.types.Panel): elif theme.theme_area == 'COLOR_SETS': col = split.column() - for i,ui in enumerate(theme.bone_color_sets): - col.label(text="Color Set %d:" % (i+1)) # i starts from 0 - + for i, ui in enumerate(theme.bone_color_sets): + col.label(text="Color Set %d:" % (i + 1)) # i starts from 0 + row = col.row() - + subsplit = row.split(percentage=0.95) padding = subsplit.split(percentage=0.15) @@ -651,7 +651,7 @@ class USERPREF_PT_theme(bpy.types.Panel): colsub.row().prop(ui, "normal") colsub.row().prop(ui, "select") colsub.row().prop(ui, "active") - + subsplit = row.split(percentage=0.85) padding = subsplit.split(percentage=0.15) diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 813539579b8..d401b779efb 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -1935,8 +1935,7 @@ class VIEW3D_MT_edit_armature_roll(bpy.types.Menu): def draw(self, context): layout = self.layout - layout.operator("armature.calculate_roll", text="Recalculate with Z-Axis Up").type = 'GLOBALUP' - layout.operator("armature.calculate_roll", text="Recalculate with Z-Axis to Cursor").type = 'CURSOR' + layout.operator_menu_enum("armature.calculate_roll", "type") layout.separator() diff --git a/source/tests/batch_import.py b/source/tests/batch_import.py index 29b6bb8b9aa..5fbe38e08ce 100644 --- a/source/tests/batch_import.py +++ b/source/tests/batch_import.py @@ -39,6 +39,7 @@ Example Usage: import os import sys + def clear_scene(): import bpy unique_obs = set() |