Short description of error
Adding
from __future__ import annotations
at the top of a python file makes the properties annotations of operators non-existent.
This will be enabled by default in Python 4.0, see: https://www.python.org/dev/peps/pep-0563
Exact steps for others to reproduce the error
Create and enable this simple demo addon:
from __future__ import annotations # this line makes the line 30 throw an error, because the property some_prop of BUGANNOTATIONS_OT_some_op will no longer exist bl_info = { 'name': 'Bug annotations with __future__', 'author': 'Arnold, Arnaud Couturier, piiichan (couturier.arnaud@gmail.com)', 'version': (1, 0, 0), 'blender': (2, 80, 0), 'location': 'scene options', 'category': 'Scene', } import bpy class BUGANNOTATIONS_OT_some_op(bpy.types.Operator): bl_idname = 'scene.hey' bl_label = 'An operator' some_prop: bpy.props.StringProperty(name='Hello', default='Default value') class BUGANNOTATIONS_PT_some_panel(bpy.types.Panel): bl_region_type = 'WINDOW' bl_space_type = 'PROPERTIES' bl_context = 'scene' bl_options = {'DEFAULT_CLOSED'} bl_label = 'Bug annotations' def draw(self, context): op = self.layout.operator(BUGANNOTATIONS_OT_some_op.bl_idname) print(op.some_prop) def register(): bpy.utils.register_class(BUGANNOTATIONS_OT_some_op) bpy.utils.register_class(BUGANNOTATIONS_PT_some_panel) def unregister(): bpy.utils.unregister_class(BUGANNOTATIONS_PT_some_panel) bpy.utils.unregister_class(BUGANNOTATIONS_OT_some_op)
then go in the scene settings, a new panel appears. Show the button inside, and look into the console, you'll see that some_prop from the operator doesn't exist if future is imported.