This question has likely been asked before. I tried to search, but I honestly don't know how to phrase the question specifically enough to find anything.

If I define a property inside of a class like this:

class Type(bpy.types.PropertyGroup):

    stuff : bpy.props.BoolProperty(
        name="Property Name",
        description="Property Info",

Is it possible to access the name, description, default, and other fields, later at execution time? Say, for example, during a panel draw function?


After posting, I starting playing around and found that class_instance.__annotations__.values() seems to include all of this data. But I'm not sure how to sort it out or access the data. I'm still pretty unskilled with Python concepts like tuples and dictionaries, but it looks like the wanted data may be in a dictionary? I'm thinking it may be possible to access it with something like var.__annotations__.values()[1]['description'].

But even if something like this is possible, would it be the correct way to do it? Is there a better way?

  • 1
    $\begingroup$ annotations is a new stuff in Python3. Which Blender 2.80 adapt the feature to make those properties as annotations. And you can use __annotations__ to access those data for sure. If the value is not modified since the Group created, those properties can only be access in annotations AFAIK. But maybe I am wrong. $\endgroup$
    – HikariTW
    Commented Sep 29, 2019 at 4:29

1 Answer 1


You can access them through RNA without using annotations. Assuming you have registered your PropertyGroup you can access them like in the following example.

For instance the code below gives you access to the description of Eevee's render samples property.

  • $\begingroup$ Thanks! Are bl_rna.properties and __annotations__ similar features? I don't entirely understand what sets these apart. One thing I noticed was that __annotations__ only seems to include "properties", where bl_rna.properties seems to include all members? Is that true? Are there any other differences? $\endgroup$
    – Robert
    Commented Sep 29, 2019 at 13:26
  • $\begingroup$ After looking a little deeper, __annotations__ looks to primarily be groupings of strings, where bl_rna.properties looks more like a class instance with many property details, some of which are also strings. I think I'm starting to get it. $\endgroup$
    – Robert
    Commented Sep 29, 2019 at 13:49
  • $\begingroup$ The __annotations__ are relevant for the declaration of the properties using the : syntax. It allows you to access the class variables like a dictionary. It usually becomes relevant when you want to create properties dynamically (which you don't do in your example). I haven't checked Blender's source code for this, but I'm fairly certain that bl_rna.properties uses these annotations under the hood. If the properties are registered I find the approach through the Blender API a bit nicer. $\endgroup$ Commented Sep 29, 2019 at 13:59

You must log in to answer this question.

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