Could not create instance of operator to call callback function error in Blender 4.4 add-ons

When running some add-ons in Blender 4.4, users began to encounter an error: Could not create instance of _OPERATOR_ to call callback function ‘_function_’. This is due to recent changes in the Blender Python API for Blender 4.4.

The reason for this error is as follows:

In Blender 4.3 and earlier, if the __init__ function was overridden in the add-on code for some purpose, this overriding did not require specifying parameters.

The add-on developer overrode the __init__ function and called the __init__ function of the parent class like this:

If we run the add-on with such a redefinition of this function in Blender 4.4, an error occurs:

RuntimeError: could not create instance of TEST_OT_op to call callback function ‘execute’

Starting with version 4.4, overriding this function requires specifying parameters.

Now we need to override the __init__ function and call its parent version as follows:

With such override, Blender 4.4 does not throw errors.

To solve the problem with such add-ons, you need to contact their developers and ask them to make such changes in the code, or make it yourself, simply replacing the lines without specifying parameters with lines specifying the parameters of the __init__ function.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments