Class naming conventions in Blender 2.8 Python API

In Blender 2.8 API the requirements for the class and their identifiers naming are becoming tougher. The class name must match the following convention:

Where the {SEPARATOR} is two letters denoting the class belonging to a certain type (from which type the class is inherited):

  • HT – Header
  • MT – Menu
  • OT – Operator
  • PT – Panel
  • UL – UI list

The class identifier “bl_idname” mast match the class name.

Examples of valid class names and identifiers:

If class name or identifier doesn’t meet the conventions, Blender signals with error:

‘Oscurart Files Tools’ doesn’t contain ‘_PT_’ with prefix & suffix


Author: Nikita

Blender add-ons developer and articles writer.