blender/release/ui/buttons_data_mesh.py
Brecht Van Lommel dc7d0ef474 UI:
* Add Lamp Fallof Curve and Texture Color Ramp panels.
* Use button space context data.
* A few other minor python layout script updates.
2009-06-03 00:17:35 +00:00

34 lines
759 B
Python

import bpy
class DataButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
return (context.mesh != None)
class DATA_PT_surface(DataButtonsPanel):
__idname__ = "DATA_PT_surface"
__label__ = "Mesh"
def draw(self, context):
mesh = context.mesh
layout = self.layout
split = layout.split()
col = split.column()
col.itemR(mesh, "autosmooth")
colsub = col.column()
colsub.active = mesh.autosmooth
colsub.itemR(mesh, "autosmooth_angle", text="Angle")
sub = split.column()
sub.itemR(mesh, "vertex_normal_flip")
sub.itemR(mesh, "double_sided")
layout.itemR(mesh, "texco_mesh")
bpy.types.register(DATA_PT_surface)