Since anything before and after the dot is arbitrary, why bother?
RuntimeError: Error: Registering operator class: 'abcdefg', invalid bl_idname 'abcdefg', must contain 1 '.' character
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
This rule may seem arbitrary, but looks like there's already some structure in existing operator's names. All registered operators will end up within
bpy.ops module, and we can see that identifiers directly under it is reserved for modules/namespaces further categorizing the operators:
bpy.ops.actionfor animation data,
bpy.ops.objectfor object, regardless of data type,
bpy.ops.uifor user interface,
When we need an operator to quit Blender, it's available, grouped with other window management operators.
At first I, too, didn't bother with naming, putting everything under
bpy.ops.object. But namespace distinction really helps to document, browse and search all the operators. Predictable identifier + Python console's Autocomplete feature made it easier to discover and build upon existing operators, including those from other addons.
I don't know if it has any other significance, but self-documentation alone made the naming rule worthwhile to enforce.
Developer note: in C code blenders operators are formatted
SOME_OT_operator, which gets converted to
some.operator in Python. To ensure the conversion can be done the "." needs to be added.
Then we can expose all operators as
bpy.ops.some.operator() too, which is neat/logical.
This is arbitrary and we could have chosen not to do it, but I think having each tool in a named category is a good thing.