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

buttons_data_empty.py « ui « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 94caa4ed700551f5c800e1456447e3c4d6edab88 (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

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 == 'EMPTY')
	
class DATA_PT_empty(DataButtonsPanel):
	__idname__ = "DATA_PT_empty"
	__label__ = "Empty"

	def draw(self, context):
		ob = context.active_object
		layout = self.layout

		layout.itemR(ob, "empty_draw_type")
		layout.itemR(ob, "empty_draw_size")
		
bpy.types.register(DATA_PT_empty)