Considering the Python API documentation about Class registration and the naming convention for operators, panels, etc., here:

Class registration

It is stated that:

The class name convention is: UPPER_CASE_{SEPARATOR}_mixed_case...


Valid Examples:

  • class OBJECT_OT_fancy_tool (and bl_idname = "object.fancy_tool")
  • class MyFancyTool (and bl_idname = "MYADDON_MT_MyFancyTool")
  • class SOME_HEADER_HT_my_header
  • class PANEL123_PT_myPanel (lower case is preferred but mixed case is supported).

My question is specifically about the prefix, the UPPER_CASE_ part. Common examples I have seen are: OBJECT_, and VIEW3D_, which for me represent things at different abstraction levels, OBJECT_ perhaps relates to the "Object mode" whereas VIEW3D_ relates to the "3D Viewport" editor(?)

object and view3d

I don't really know what prefix to use for my Panels and Operator classes. Should I just use my addon name there, e.g MYADDON_PT_some_panel? If the documentation is accurate I should use whatever pleases me considering the above valid examples.

In short: what is the convention for naming Operators, Panels, Menus, etc.?

Note: there's a somewhat similar question, but it doesn't address the prefix in detail, here:

What are the class naming conventions for blender?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.