2009-05-11 17:34:31 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
2009-08-22 08:48:01 +00:00
|
|
|
__space_type__ = 'PROPERTIES'
|
|
|
|
__region_type__ = 'WINDOW'
|
2009-05-11 17:34:31 +00:00
|
|
|
__context__ = "data"
|
|
|
|
|
|
|
|
def poll(self, context):
|
2009-06-18 14:20:25 +00:00
|
|
|
return (context.object and context.object.type == 'EMPTY')
|
2009-05-11 17:34:31 +00:00
|
|
|
|
|
|
|
class DATA_PT_empty(DataButtonsPanel):
|
|
|
|
__label__ = "Empty"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-27 20:39:10 +00:00
|
|
|
|
2009-06-13 21:22:21 +00:00
|
|
|
ob = context.object
|
2009-05-11 17:34:31 +00:00
|
|
|
|
|
|
|
layout.itemR(ob, "empty_draw_type")
|
|
|
|
layout.itemR(ob, "empty_draw_size")
|
|
|
|
|
2009-06-18 14:20:25 +00:00
|
|
|
bpy.types.register(DATA_PT_empty)
|