diff --git a/scripts/startup/bl_ui/properties_grease_pencil_common.py b/scripts/startup/bl_ui/properties_grease_pencil_common.py index 9642cd56962..57cc460e403 100644 --- a/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -417,14 +417,16 @@ class AnnotationDataPanel: bl_options = {'DEFAULT_CLOSED'} def draw_header(self, context): - if context.space_data.type not in { + space = context.space_data + if space.type not in { 'VIEW_3D', 'TOPBAR', 'SEQUENCE_EDITOR', 'IMAGE_EDITOR', 'NODE_EDITOR', - 'PROPERTIES'}: - self.layout.prop(context.space_data, "show_annotation", text="") + 'PROPERTIES', + }: + self.layout.prop(space, "show_annotation", text="") def draw(self, context): layout = self.layout