2009-10-31 20:16:59 +00:00
|
|
|
# This software is distributable under the terms of the GNU
|
|
|
|
# General Public License (GPL) v2, the text of which can be found at
|
|
|
|
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
|
|
|
|
# using this module constitutes acceptance of the terms of this License.
|
|
|
|
|
2009-05-11 17:34:31 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
return (context.object and context.object.type == 'EMPTY')
|
|
|
|
|
2009-05-11 17:34:31 +00:00
|
|
|
class DATA_PT_empty(DataButtonsPanel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Empty"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.object
|
2009-05-11 17:34:31 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
layout.itemR(ob, "empty_draw_type", text="Display")
|
|
|
|
layout.itemR(ob, "empty_draw_size", text="Size")
|
2009-05-11 17:34:31 +00:00
|
|
|
|
2009-06-18 14:20:25 +00:00
|
|
|
bpy.types.register(DATA_PT_empty)
|