I'm working on adaptation some addon from 2.79 to 2.8x. It uses property groups to fill other objects with recurring attributes.

my_float_prop: bpy.props.FloatProperty(default=3.1415926)

my_float_prop: TestProps.my_float_prop

With 2.79 using = assignment addon works fine. But 2.8x with pep-0526 I'm getting

AttributeError: type object 'TestProps' has no attribute 'my_float_prop'

I had created github repo demonstrates my problem with same project structure.

  • $\begingroup$ Hi. Any relevant code (like a basic working example that still demonstrates the issue) should be in the question body itself. Thanks. $\endgroup$ Jul 1, 2020 at 12:20
  • 1
    $\begingroup$ It is now defined as an annotation. Try something like TestProp.__annotations__["my_float_prop"] Consider too using math.pi. $\endgroup$
    – batFINGER
    Jul 1, 2020 at 12:28
  • $\begingroup$ Thanks, batFINGER. That wotks! $\endgroup$
    – RUben
    Jul 1, 2020 at 12:33

1 Answer 1


Using annotations rather than class properties

It is now defined as an annotation. They are added to a key value dictionary __annotations__ on the class on which they are defined. Try something like


There is a generic Namespace class where can

from argparse import Namespace
props = Namespace(**TestProp.__annotations__)

and then access them via


Consider too using math.pi.

  • $\begingroup$ Another thanks for Namespace solution $\endgroup$
    – RUben
    Jul 2, 2020 at 11:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .