forked from bartvdbraak/blender
09fd0a5e48
* Again, some layout code cleaning. * Made assignments more consistent. I started to write code guidelines in the wiki: http://wiki.blender.org/index.php/LayoutFiles-Code_Guidelines Matt/William: You are welcome to change them or add new infos, I will continue on improving them as well in the next few days.
24 lines
479 B
Python
24 lines
479 B
Python
|
|
import bpy
|
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
|
__space_type__ = "BUTTONS_WINDOW"
|
|
__region_type__ = "WINDOW"
|
|
__context__ = "data"
|
|
|
|
def poll(self, context):
|
|
return (context.object and context.object.type == 'EMPTY')
|
|
|
|
class DATA_PT_empty(DataButtonsPanel):
|
|
__label__ = "Empty"
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
|
|
ob = context.object
|
|
|
|
layout.itemR(ob, "empty_draw_type")
|
|
layout.itemR(ob, "empty_draw_size")
|
|
|
|
bpy.types.register(DATA_PT_empty)
|