diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-08-26 21:00:25 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-08-26 21:00:25 +0400 |
commit | db844959d18e21e8fbb6f1f3a425b757d0dcb05b (patch) | |
tree | 95ed6ec8437fa7fcc000d21b79503489ec8247a6 /release | |
parent | fb3f32760d68134aadb7978922360857f0ecccb7 (diff) |
Add operator that deletes a texture paint layer for blender internal.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index e91ec59a64f..31e7f606770 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1038,12 +1038,16 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): mat, "paint_active_slot", rows=2) if (not mat.use_nodes) and (context.scene.render.engine == 'BLENDER_RENDER'): - col.operator_menu_enum("paint.add_texture_paint_slot", "type") + row = col.row(align=True) + row.operator_menu_enum("paint.add_texture_paint_slot", "type") + row.operator("paint.delete_texture_paint_slot", text="", icon='X') - slot = mat.texture_paint_slots[mat.paint_active_slot] - col.separator() - col.label("UV Map") - col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="") + if mat.texture_paint_slots: + slot = mat.texture_paint_slots[mat.paint_active_slot] + + col.separator() + col.label("UV Map") + col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="") col.separator() col.operator("image.save_dirty", text="Save All Images") |