__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'EMPTY')
+ return (context.object and context.object.type == 'EMPTY')
class DATA_PT_empty(DataButtonsPanel):
__idname__ = "DATA_PT_empty"
__label__ = "Empty"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
layout.itemR(ob, "empty_draw_type")
layout.itemR(ob, "empty_draw_size")