Welcome to mirror list, hosted at ThFree Co, Russian Federation.

buttons_data_mesh.py « ui « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 44a48dcc534b4e9399e0c92e1e5ec7035cd24644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
		
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.active_object.data
			layout = self.layout

			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")
			
			layout.itemR(mesh, "texco_mesh")			
						
bpy.types.register(DATA_PT_surface)