Code cleanup: style

This commit is contained in:
Campbell Barton 2014-02-22 11:14:15 +11:00
parent 1a79abdad2
commit b7fa08f88a
16 changed files with 21 additions and 14 deletions

View file

@ -18,6 +18,7 @@
# <pep8 compliant>
class GreasePencilPanel():
# subclass must set
# bl_space_type = 'IMAGE_EDITOR'

View file

@ -23,6 +23,7 @@ from bpy.types import Panel, Header, Menu, UIList
from bpy.app.translations import pgettext_iface as iface_
from bl_ui.properties_grease_pencil_common import GreasePencilPanel
class CLIP_UL_tracking_objects(UIList):
def draw_item(self, context, layout, data, item, icon,
active_data, active_propname, index):

View file

@ -45,6 +45,7 @@ class BrushButtonsPanel:
toolsettings = context.tool_settings.image_paint
return sima.show_paint and toolsettings.brush
class UVToolsPanel:
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'TOOLS'
@ -55,6 +56,7 @@ class UVToolsPanel:
sima = context.space_data
return sima.show_uvedit and not context.tool_settings.use_uv_sculpt
class IMAGE_MT_view(Menu):
bl_label = "View"
@ -494,6 +496,7 @@ class IMAGE_PT_mask(MASK_PT_mask, Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
class IMAGE_PT_mask_layers(MASK_PT_layers, Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
@ -653,9 +656,10 @@ class IMAGE_PT_tools_transform_uvs(Panel, UVToolsPanel):
col.operator("transform.shear")
class IMAGE_PT_paint(Panel, ImagePaintPanel):
bl_label = "Paint"
@classmethod
def poll(cls, context):
sima = context.space_data
@ -986,6 +990,7 @@ class IMAGE_PT_tools_mask(MASK_PT_tools, Panel):
# --- end mask ---
class IMAGE_PT_view_histogram(Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'TOOLS'