bl_label = "Mesh Display"
def poll(self, context):
- editmesh = context.mode == 'EDIT_MESH'
- return (editmesh)
+ # The active object check is needed because of localmode
+ return (context.active_object and (context.mode == 'EDIT_MESH'))
def draw(self, context):
layout = self.layout
def draw(self, context):
layout = self.layout
- mesh = context.active_object.data
+ ob = context.active_object
- col = layout.column(align=True)
- col.itemR(mesh, "use_mirror_x")
+ if ob:
+ mesh = context.active_object.data
+ col = layout.column(align=True)
+ col.itemR(mesh, "use_mirror_x")
# ********** default tools for editmode_curve ****************