diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-10 21:26:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-10 21:26:15 +0400 |
commit | 301e5b4ea0bbcb2129528265b95e7247920a88da (patch) | |
tree | e230e506b12d2682da28339d358141067a88c0b1 /release/scripts/startup | |
parent | de7592b48900221844fa8d687e9d850294c90746 (diff) |
fix for various python bugs and remove unused var.
Diffstat (limited to 'release/scripts/startup')
10 files changed, 10 insertions, 21 deletions
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py index eb1bbfd2fb1..3b33a7ccc61 100644 --- a/release/scripts/startup/bl_ui/properties_animviz.py +++ b/release/scripts/startup/bl_ui/properties_animviz.py @@ -94,4 +94,5 @@ class OnionSkinButtonsPanel(): col.prop(arm, "show_only_ghost_selected", text="Selected Only") if __name__ == "__main__": # only for live edit. + import bpy bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index 9477dc866ab..f2a3bac2373 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -299,10 +299,7 @@ class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , bpy.types.Panel): # in return (context.object) and (context.armature) def draw(self, context): - layout = self.layout - ob = context.object - self.draw_settings(context, ob.pose.animation_visualisation, bones=True) diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 00d8d08852e..3c88127c724 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -122,7 +122,6 @@ class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - ob = context.object curve = context.curve row = layout.row() diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index ae66642e903..cdbcf2cf533 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -34,7 +34,6 @@ class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel): def draw(self, context): layout = self.layout space = context.space_data - ob = context.object if space.use_pin_id: layout.template_ID(space, "pin_id") diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 01890bc3c99..f0265f8db67 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -208,7 +208,7 @@ class TextureSlotPanel(TextureButtonsPanel): return False engine = context.scene.render.engine - return TextureButtonsPanel.poll(self, context) and (engine in cls.COMPAT_ENGINES) + return TextureButtonsPanel.poll(cls, context) and (engine in cls.COMPAT_ENGINES) # Texture Type Panels # diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index b1322d453fc..722b46aba11 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -434,7 +434,6 @@ class IMAGE_PT_game_properties(bpy.types.Panel): @classmethod def poll(cls, context): - rd = context.scene.render sima = context.space_data # display even when not in game mode because these settings effect the 3d view return (sima and sima.image) # and (rd.engine == 'BLENDER_GAME') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index c598788006c..24b90988953 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -126,7 +126,7 @@ class USERPREF_MT_appconfigs(bpy.types.Menu): preset_operator = "wm.appconfig_activate" def draw(self, context): - props = self.layout.operator("wm.appconfig_default", text="Blender (default)") + self.layout.operator("wm.appconfig_default", text="Blender (default)") # now draw the presets bpy.types.Menu.draw_preset(self, context) @@ -1124,7 +1124,6 @@ class WM_OT_addon_install(bpy.types.Operator): del pyfile_dir # done checking for exceptional case - addon_files_old = set(os.listdir(path_addons)) addons_old = {mod.__name__ for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules)} #check to see if the file is in compressed format (.zip) diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index e99cefb91b8..29ec6301fc1 100644 --- a/release/scripts/startup/bl_ui/space_userpref_keymap.py +++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py @@ -189,9 +189,9 @@ class InputKeyMapPanel: if km.is_modal: row.label(text="", icon='LINKED') if km.is_user_defined: - op = row.operator("wm.keymap_restore", text="Restore") + row.operator("wm.keymap_restore", text="Restore") else: - op = row.operator("wm.keymap_edit", text="Edit") + row.operator("wm.keymap_edit", text="Edit") if km.show_expanded_children: if children: @@ -213,7 +213,7 @@ class InputKeyMapPanel: col = self.indented_layout(col, level + 1) subcol = col.split(percentage=0.2).column() subcol.enabled = km.is_user_defined - op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN') + subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN') col.separator() @@ -351,9 +351,9 @@ class InputKeyMapPanel: row.label() if km.is_user_defined: - op = row.operator("wm.keymap_restore", text="Restore") + row.operator("wm.keymap_restore", text="Restore") else: - op = row.operator("wm.keymap_edit", text="Edit") + row.operator("wm.keymap_edit", text="Edit") for kmi in filtered_items: self.draw_kmi(display_keymaps, kc, km, kmi, col, 1) @@ -362,7 +362,7 @@ class InputKeyMapPanel: col = self.indented_layout(layout, 1) subcol = col.split(percentage=0.2).column() subcol.enabled = km.is_user_defined - op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN') + subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN') def draw_hierarchy(self, display_keymaps, layout): for entry in KM_HIERARCHY: @@ -723,9 +723,7 @@ class WM_OT_keyitem_add(bpy.types.Operator): bl_label = "Add Key Map Item" def execute(self, context): - wm = context.window_manager km = context.keymap - kc = wm.keyconfigs.default if km.is_modal: km.keymap_items.new_modal("", 'A', 'PRESS') # kmi diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 52eb76d0710..9a85b87a9eb 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -60,7 +60,6 @@ def draw_gpencil_tools(context, layout): # ********** default tools for objectmode **************** - class VIEW3D_PT_tools_objectmode(View3DPanel, bpy.types.Panel): bl_context = "objectmode" bl_label = "Object Tools" @@ -944,7 +943,6 @@ class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel): tool_settings = context.tool_settings sculpt = tool_settings.sculpt - settings = __class__.paint_settings(context) layout.label(text="Lock:") row = layout.row(align=True) @@ -974,7 +972,6 @@ class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel): layout = self.layout sculpt = context.tool_settings.sculpt - settings = __class__.paint_settings(context) split = layout.split() diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index 8cb63ea48cf..dcc1afed74b 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -407,7 +407,7 @@ class BUILTIN_KSI_DeltaRotation(bpy.types.KeyingSetInfo): # add the property name to the base path # rotation mode affects the property used if data.rotation_mode == 'QUATERNION': - path = path_add_property(base_path, "delta_rotation_quaternion") + path = keyingsets_utils.path_add_property(base_path, "delta_rotation_quaternion") elif data.rotation_mode == 'AXIS_ANGLE': # XXX: for now, this is not available yet #path = path_add_property(base_path, "delta_rotation_axis_angle") |