diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-24 18:16:56 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-24 18:16:56 +0400 |
commit | 5b26f520bb50f17b0a2193daf9b8b10616c4707b (patch) | |
tree | 868be9ac8f1bd3da6acb283198dec7291c779cd0 /release | |
parent | a379fdd7fba460fdceb14d6dd164116d9a4744bd (diff) |
UI
* Added SCROLL button type, use like a NUMSLI basically, with
a1 used to define the scroller size.
* Add scroll and toggle colors to the Theme (toggle was set to
draw like radio in a recent commit, but it's the intention
these look different).
* Added rudimentary list template, used for object material
slots, this is WIP though.
* In popup menu, split text with line breaks over multiple
lines, makes python errors display slightly nicer.
Diffstat (limited to 'release')
-rw-r--r-- | release/ui/buttons_data_mesh.py | 32 | ||||
-rw-r--r-- | release/ui/space_text.py | 4 |
2 files changed, 30 insertions, 6 deletions
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py index fb64f42c24a..e5c1b8fc9ee 100644 --- a/release/ui/buttons_data_mesh.py +++ b/release/ui/buttons_data_mesh.py @@ -46,6 +46,34 @@ class DATA_PT_mesh(DataButtonsPanel): sub.itemR(mesh, "vertex_normal_flip") sub.itemR(mesh, "double_sided") - layout.itemR(mesh, "texco_mesh") - + layout.itemR(mesh, "texco_mesh") + + +class DATA_PT_materials(DataButtonsPanel): + __idname__ = "DATA_PT_materials" + __label__ = "Materials" + + def poll(self, context): + return (context.object and context.object.type in ('MESH', 'CURVE', 'FONT', 'SURFACE')) + + def draw(self, context): + layout = self.layout + ob = context.object + + row = layout.row() + + row.template_list(ob, "materials", "active_material_index", items=10) + + col = row.column(align=True) + col.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="") + col.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="") + + row = layout.row(align=True) + + row.itemO("OBJECT_OT_material_slot_assign", text="Assign"); + row.itemO("OBJECT_OT_material_slot_select", text="Select"); + row.itemO("OBJECT_OT_material_slot_deselect", text="Deselect"); + bpy.types.register(DATA_PT_mesh) +bpy.types.register(DATA_PT_materials) + diff --git a/release/ui/space_text.py b/release/ui/space_text.py index 92e7639553f..19a495d375e 100644 --- a/release/ui/space_text.py +++ b/release/ui/space_text.py @@ -1,10 +1,6 @@ import bpy -# temporary -ICON_TEXT = 120 -ICON_HELP = 1 - class TEXT_HT_header(bpy.types.Header): __space_type__ = "TEXT_EDITOR" __idname__ = "TEXT_HT_header" |