2.5 Buttons:
[blender.git] / release / ui / buttons_data_mesh.py
1                 
2 import bpy
3
4 class DataButtonsPanel(bpy.types.Panel):
5         __space_type__ = "BUTTONS_WINDOW"
6         __region_type__ = "WINDOW"
7         __context__ = "data"
8         
9         def poll(self, context):
10                 ob = context.active_object
11                 return (ob and ob.type == 'MESH')
12
13 class DATA_PT_surface(DataButtonsPanel):
14                 __idname__ = "DATA_PT_surface"
15                 __label__ = "Surface"
16
17                 def draw(self, context):
18                         mesh = context.active_object.data
19                         layout = self.layout
20
21                         split = layout.split()
22                 
23                         sub = split.column()
24                         sub.itemR(mesh, "autosmooth")
25                         sub.itemR(mesh, "autosmooth_angle", text="Angle")
26                         sub = split.column()
27                         sub.itemR(mesh, "vertex_normal_flip")
28                         sub.itemR(mesh, "double_sided")
29                         
30                         layout.itemR(mesh, "texco_mesh")                        
31                                                 
32 bpy.types.register(DATA_PT_surface)