Class types

i try to understand if any class must have a type and why? [class MyClass(bpy.types…)]
and what i must have when i write a new class?
dose every class must have the “bl_idname”? and the idname must be like rte class name?

The class type is so that your class inherits from blender’s classes and is able to interact with blender itself.

The bl_idname is something like the mailing address, a name for you (or anything) to reference that class and interact with it. It’s a blender specific property (hence the bl_)

There’s a ton of great info in the API docs:
Integration through classes

As for making standard classes, sure, you can. But I only see that happening for fairly complex add-ons.

1 Like