2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-05-11 17:34:31 +00:00
|
|
|
import bpy
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-05-11 17:34:31 +00:00
|
|
|
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-10-31 23:35:56 +00:00
|
|
|
|
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)
|