2
$\begingroup$

The python api change notes for 2.80 give new requirements for bl_idname. I'm getting an error telling me that "MAPLUS_OT_changetypebaseclass" is an invalid name:

RuntimeError: Error: Registering operator class: 'ChangeTypeBaseClass', invalid bl_idname 'MAPLUS_OT_changetypebaseclass', at position 0

Am I following the naming requirements properly? The addon file is here for reference.

$\endgroup$

2 Answers 2

3
$\begingroup$

Expected a class name including _OT_
This should work.

class MAPLUS_OT_changetypebaseclass(bpy.types.Operator):
    bl_idname = "maplus.changetypebaseclass"
$\endgroup$
2
  • $\begingroup$ TO elaborate for OP: this has not changed: For operator to be known as bpy.ops.foo.bar() requires bl_idname = "foo.bar" (Lower case one dot, this is the error you are seeing "M" at position 0 is not lower case (and nextly there's no dot)) Blender will generate a registered class bpy.types.FOO_OT_barFor other registerable types the bl_idname (if omitted is the class name) and needs to follow the naming convention to avoid the warning message $\endgroup$
    – batFINGER
    Dec 10, 2018 at 9:35
  • $\begingroup$ The wiki page specifically notes: "Valid Examples: OBJECT_OT_fancy_tool", and notes that "This constraint applies to the bl_idname of each class (or the class name which uses it if no bl_idname is defined in the class)". So, is the addons page wrong, or is this just a case of these features not being implemented? It seems very unclear to me based on the language on the wiki...I just want to clearly understand the full requirements for bl_idname and/or class name(s). $\endgroup$
    – egtwobits
    Dec 16, 2018 at 1:31
1
$\begingroup$

Keep in mind 2.8 is very Beta. But I could be wrong, but I'm surprised thats the only error you're getting. I thought all of the class names were to be changed? But I saw that on this programmers video: https://www.youtube.com/watch?v=Mjy-zGG3Wk4

So I don't know if this generates errors or not.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .