diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-26 07:00:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-26 07:00:55 +0400 |
commit | 794f3291fed5f85f8057a49683acdcb80edb0a02 (patch) | |
tree | 90dcffc20aef49385116f25651d2edec9a04d308 /release/scripts/startup/bl_ui | |
parent | e59ef5e419b52e16f831bfc31c5773419c546ae1 (diff) | |
parent | 9fb2e5dde70bd971dabfdf3b1099d92241dc96ed (diff) |
svn merge -r38200:38300 https://svn.blender.org/svnroot/bf-blender/trunk/blender, source/blender/gpu/intern/gpu_buffers.c updated from trunk and re-made edits to use getTessFace* functions.
Diffstat (limited to 'release/scripts/startup/bl_ui')
10 files changed, 22 insertions, 33 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..6a809aefb9d 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) @@ -986,7 +986,7 @@ class USERPREF_PT_addons(bpy.types.Panel): split.label(text="Warning:") split.label(text=' ' + info["warning"], icon='ERROR') - user_addon = __class__.is_user_addon(mod, user_addon_paths) + user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths) tot_row = bool(info["wiki_url"]) + bool(info["tracker_url"]) + bool(user_addon) if tot_row: @@ -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) @@ -1137,7 +1136,7 @@ class WM_OT_addon_install(bpy.types.Operator): if self.overwrite: for f in file_to_extract.namelist(): - __class__._module_remove(path_addons, f) + WM_OT_addon_install._module_remove(path_addons, f) else: for f in file_to_extract.namelist(): path_dest = os.path.join(path_addons, os.path.basename(f)) @@ -1161,7 +1160,7 @@ class WM_OT_addon_install(bpy.types.Operator): path_dest = os.path.join(path_addons, os.path.basename(pyfile)) if self.overwrite: - __class__._module_remove(path_addons, os.path.basename(pyfile)) + WM_OT_addon_install._module_remove(path_addons, os.path.basename(pyfile)) elif os.path.exists(path_dest): self.report({'WARNING'}, "File already installed to %r\n" % path_dest) return {'CANCELLED'} @@ -1226,7 +1225,7 @@ class WM_OT_addon_remove(bpy.types.Operator): return None, False def execute(self, context): - path, isdir = __class__.path_from_addon(self.module) + path, isdir = WM_OT_addon_remove.path_from_addon(self.module) if path is None: self.report('WARNING', "Addon path %r could not be found" % path) return {'CANCELLED'} @@ -1246,7 +1245,7 @@ class WM_OT_addon_remove(bpy.types.Operator): # lame confirmation check def draw(self, context): self.layout.label(text="Remove Addon: %r?" % self.module) - path, isdir = __class__.path_from_addon(self.module) + path, isdir = WM_OT_addon_remove.path_from_addon(self.module) self.layout.label(text="Path: %r" % path) def invoke(self, context, event): diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index e99cefb91b8..85764c55304 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() @@ -234,7 +234,7 @@ class InputKeyMapPanel: for pname, value in properties.bl_rna.properties.items(): if pname != "rna_type" and not properties.is_property_hidden(pname): if isinstance(value, bpy.types.OperatorProperties): - __class__.draw_kmi_properties(box, value, title=pname) + InputKeyMapPanel.draw_kmi_properties(box, value, title=pname) else: flow.prop(properties, pname) @@ -325,7 +325,7 @@ class InputKeyMapPanel: # Operator properties props = kmi.properties if props is not None: - __class__.draw_kmi_properties(box, props) + InputKeyMapPanel.draw_kmi_properties(box, props) # Modal key maps attached to this operator if not km.is_modal: @@ -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.py b/release/scripts/startup/bl_ui/space_view3d.py index ab5087ec19f..4b7fe47e2c4 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2408,7 +2408,7 @@ class VIEW3D_PT_context_properties(bpy.types.Panel): def draw(self, context): import rna_prop_ui - member = __class__._active_context_member(context) + member = VIEW3D_PT_context_properties._active_context_member(context) if member: # Draw with no edit button diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 52eb76d0710..e1efeed87ea 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" @@ -466,7 +465,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - settings = __class__.paint_settings(context) + settings = self.paint_settings(context) brush = settings.brush if not context.particle_edit_object: @@ -687,7 +686,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - settings = __class__.paint_settings(context) + settings = self.paint_settings(context) brush = settings.brush tex_slot = brush.texture_slot @@ -786,7 +785,7 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - settings = __class__.paint_settings(context) + settings = self.paint_settings(context) brush = settings.brush col = layout.column(align=True) @@ -821,7 +820,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - settings = __class__.paint_settings(context) + settings = self.paint_settings(context) brush = settings.brush image_paint = context.image_paint_object @@ -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() @@ -1006,7 +1003,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - settings = __class__.paint_settings(context) + settings = self.paint_settings(context) brush = settings.brush if brush is None: # unlikely but can happen |