UI:
[blender-staging.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                 return (context.mesh != None)
11
12 class DATA_PT_surface(DataButtonsPanel):
13                 __idname__ = "DATA_PT_surface"
14                 __label__ = "Mesh"
15
16                 def draw(self, context):
17                         mesh = context.mesh
18                         layout = self.layout
19
20                         split = layout.split()
21                 
22                         col = split.column()
23                         col.itemR(mesh, "autosmooth")
24                         colsub = col.column()
25                         colsub.active = mesh.autosmooth
26                         colsub.itemR(mesh, "autosmooth_angle", text="Angle")
27                         sub = split.column()
28                         sub.itemR(mesh, "vertex_normal_flip")
29                         sub.itemR(mesh, "double_sided")
30                         
31                         layout.itemR(mesh, "texco_mesh")                        
32                                                 
33 bpy.types.register(DATA_PT_surface)