c671469bbb
* Converted all modifier to python layout engine. Needs a layout cleanup still. * Removed corresponding C code (brecht: please check) * 2 RNA Modifier fixes * Added initial Mesh panel by William Reynish.
35 lines
789 B
Python
35 lines
789 B
Python
|
|
import bpy
|
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
|
__space_type__ = "BUTTONS_WINDOW"
|
|
__region_type__ = "WINDOW"
|
|
__context__ = "data"
|
|
|
|
def poll(self, context):
|
|
ob = context.active_object
|
|
return (ob and ob.type == 'MESH')
|
|
|
|
|
|
class DATA_PT_surface(DataButtonsPanel):
|
|
__idname__ = "DATA_PT_surface"
|
|
__label__ = "Surface"
|
|
|
|
def draw(self, context):
|
|
mesh = context.main.meshes[0]
|
|
layout = self.layout
|
|
|
|
if not mesh:
|
|
return
|
|
split = layout.split()
|
|
|
|
sub = split.column()
|
|
sub.itemR(mesh, "autosmooth")
|
|
sub.itemR(mesh, "autosmooth_angle", text="Angle")
|
|
sub = split.column()
|
|
sub.itemR(mesh, "vertex_normal_flip")
|
|
sub.itemR(mesh, "double_sided")
|
|
row = layout.row()
|
|
row.itemR(mesh, "texco_mesh")
|
|
|
|
bpy.types.register(DATA_PT_surface) |