diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-02-28 06:08:32 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-02-28 06:08:32 +0400 |
commit | b2a4fca7614ef3ee5527673b6f48c741534d1bd1 (patch) | |
tree | 997d06698c16f6f512268b354917ebc248e9bf84 /release | |
parent | 2a4cd1d203050e76f8738c87400996c0e9b89e41 (diff) |
Bugfix for Python errors in 3D View texture paint toolbar.
The stencil- and clone-layer menus were printing errors when the mesh
had no UV layers due to directly accessing layer names. Fixed by
setting menu text to empty if no UV layers exist.
Also changed the checkbox label for cloning from another UV layer to
read 'Clone' rather than 'Layer'.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 5171a6dd47d..8ce3420d7a8 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1133,13 +1133,15 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel): row = split.row() row.active = (ipaint.use_stencil_layer) - row.menu("VIEW3D_MT_tools_projectpaint_stencil", text=mesh.uv_texture_stencil.name) + stencil_text = mesh.uv_texture_stencil.name if mesh.uv_texture_stencil else "" + row.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text) row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA') row = layout.row() row.active = (settings.brush.image_tool == 'CLONE') - row.prop(ipaint, "use_clone_layer", text="Layer") - row.menu("VIEW3D_MT_tools_projectpaint_clone", text=mesh.uv_texture_clone.name) + row.prop(ipaint, "use_clone_layer", text="Clone") + clone_text = mesh.uv_texture_clone.name if mesh.uv_texture_clone else "" + row.menu("VIEW3D_MT_tools_projectpaint_clone", text=clone_text) layout.prop(ipaint, "seam_bleed") |