2009-05-29 09:53:46 +00:00
|
|
|
|
2009-05-21 21:23:36 +00:00
|
|
|
import bpy
|
|
|
|
|
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "BUTTONS_WINDOW"
|
|
|
|
__region_type__ = "WINDOW"
|
|
|
|
__context__ = "data"
|
|
|
|
|
|
|
|
def poll(self, context):
|
2009-06-03 00:17:35 +00:00
|
|
|
return (context.mesh != None)
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
class DATA_PT_surface(DataButtonsPanel):
|
|
|
|
__idname__ = "DATA_PT_surface"
|
2009-05-29 09:53:46 +00:00
|
|
|
__label__ = "Mesh"
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
2009-06-03 00:17:35 +00:00
|
|
|
mesh = context.mesh
|
2009-05-21 21:23:36 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
2009-05-29 09:53:46 +00:00
|
|
|
col = split.column()
|
|
|
|
col.itemR(mesh, "autosmooth")
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.active = mesh.autosmooth
|
|
|
|
colsub.itemR(mesh, "autosmooth_angle", text="Angle")
|
2009-05-21 21:23:36 +00:00
|
|
|
sub = split.column()
|
|
|
|
sub.itemR(mesh, "vertex_normal_flip")
|
|
|
|
sub.itemR(mesh, "double_sided")
|
2009-05-24 12:37:55 +00:00
|
|
|
|
|
|
|
layout.itemR(mesh, "texco_mesh")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-03 00:17:35 +00:00
|
|
|
bpy.types.register(DATA_PT_surface)
|