Meanings of _OT and _PT?

Hi All,

I’m sure this is some type of convention, but I’d like to know what it means.

Class names often start with (for instance) BONE_OT for a class that actually manipulates whatever data you’re playing with and it’ll have a companion class starting with BONE_PT which defines the UI for the first class.

So, I’ve worked out that the ‘O’ of ‘_OT’ seems to mean ‘object’ and the ‘P’ of ‘_PT’ means ‘properties’ but what does the ‘T’ stand for?

These conventions aren’t mentioned in the API, not that I can find, anyway, and Googling turns up nothing of significance.

Other questions:
Are these simply conventions or hard-n-fast rules that Blender expects to find and, without them, won’t associate the ‘worker’ class with the ‘ui display’ class?
Is there a list of these conventions somewhere?

OT operator type
PT panel type

Of course! Now that I look again, the class arguments are a dead giveaway, aren’t they.


class View3D_UI_Panel(bpy.<b>types.Panel</b>):
class OBJECT_OT_HelloButton(bpy.<b>types.Operator</b>):

Thanks, batFINGER.

OBJECT_OT_HelloButton

OT - operator type, as seen in the parenthesis

OBJECT - it’s an object operator, so expect it to be bpy.ops.object.*

HelloButton - operator name in camel case, should be expected as bpy.ops.object.hello_button()

Thanks, CoDEmanX. Guess I’d better dig back into the docs on conventions. :slight_smile: