Overriding base operators in Blender 3.5 Python API is disabled

Since Blender 3.5 version, the Python API does not allow overriding base operators.

Now we can’t create operators with the bl_idname parameter value being the same as for the base operators, which were defined in Blender by the developers, and expect that the new operator will replace the base one.

When trying to override the base operator, Blender will throw an error:

RuntimeError: Error: Registering operator class: ‘Override’, bl_idname ‘_bl_idname_’ could not be unregistered

If, for example, we try to create a class with an operator that overrides the base operator for removing an object from the scene:

When registering an operator in the Blender API, it will throw an error:

RuntimeError: Error: Registering operator class: ‘OverrideDelete’, bl_idname ‘object.delete’ could not be unregistered

and the new operator will not be registered.

Be careful when developing add-ons. And if your add-on uses overriding of base operators – make corrections to the code so that the add-on can work in Blender version 3.5 and higher.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Inline Feedbacks
View all comments