diff options
author | Thomas Dinges <blender@dingto.org> | 2011-08-27 17:38:53 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2011-08-27 17:38:53 +0400 |
commit | f4768033d876ed23567a71a2897c19c46753f788 (patch) | |
tree | d17f64037cd6035e20880585db5528cb185490b9 /texture_paint_layer_manager.py | |
parent | d744270e737d5ecb192897e94549fde45405c469 (diff) |
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!
Diffstat (limited to 'texture_paint_layer_manager.py')
-rw-r--r-- | texture_paint_layer_manager.py | 19 |
1 files changed, 6 insertions, 13 deletions
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__) |