From f4768033d876ed23567a71a2897c19c46753f788 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Sat, 27 Aug 2011 13:38:53 +0000 Subject: Addon UI Cleanup, Part 2 * You only have to do layout.prop if you want 1 property, no need for row then! * Use col, row, sub as variable names, not colsub, rowsub, row2 etc please. * Povray Addon: Still used a lot of splits, you need no split when you only have 1 column! --- texture_paint_layer_manager.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'texture_paint_layer_manager.py') diff --git a/texture_paint_layer_manager.py b/texture_paint_layer_manager.py index c3eb8afb..bb05cd90 100644 --- a/texture_paint_layer_manager.py +++ b/texture_paint_layer_manager.py @@ -124,10 +124,9 @@ class OBJECT_PT_LoadBrushes(bpy.types.Panel): def draw(self, context): layout = self.layout - row = layout.row() - row.operator('texture.load_brushes') - row = layout.row() - row.operator('texture.load_single_brush') + + layout.operator('texture.load_brushes') + layout.operator('texture.load_single_brush') #====================================================================== @@ -269,12 +268,9 @@ class OBJECT_PT_Texture_paint_add(bpy.types.Panel): if ob: mat = ob.active_material - if mat: - - #row = layout.row() + if mat: col = layout.column(align =True) - col.operator('object.add_paint_layer', text = "Add Color").ttype = 'COLOR' col.operator('object.add_paint_layer', @@ -309,8 +305,7 @@ class OBJECT_PT_Texture_paint_add(bpy.types.Panel): text = "Add Ambient").ttype = 'AMBIENT' else: - row = layout.row() - row.label(' Add a Material first!', icon = 'ERROR') + layout.label(' Add a Material first!', icon = 'ERROR') @@ -629,9 +624,7 @@ class OBJECT_PT_SavePainted(bpy.types.Panel): return (context.image_paint_object) def draw(self, context): - layout = self.layout - row = layout.row() - row.operator('paint.save_all_generated') + self.layout.operator('paint.save_all_generated') def register(): bpy.utils.register_module(__name__) -- cgit v1.2.3