[Bf-blender-cvs] [986ac02] soc-2013-paint: UI cleanup:
Antony Riakiotakis
noreply at git.blender.org
Mon May 5 14:10:55 CEST 2014
Commit: 986ac025b2a13506edfd6ed13f8827144a0b7718
Author: Antony Riakiotakis
Date: Mon May 5 14:58:02 2014 +0300
https://developer.blender.org/rB986ac025b2a13506edfd6ed13f8827144a0b7718
UI cleanup:
Only expose material list if more than one material present.
===================================================================
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index a433724..0e8d67f 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1117,8 +1117,10 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
ob = context.active_object
col = layout.column()
- col.label("Materials")
- col.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=2)
+ if len(ob.material_slots) > 1:
+ col.label("Materials")
+ col.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=2)
+
mat = ob.active_material
if mat:
col.label("Available Paint Slots")
More information about the Bf-blender-cvs
mailing list