Add-ons - And Strict variable checking

Can “Strict Typing” be turned off in an add-on?

Long story short, I hope…

I have an add-on that I’ve used for a while. It worked great in 2.93.

At 3.3.1, not so good. I have tried to repair it… I will keep trying.

The error is usually something similar to:
TypeError: bpy_struct: item.attr = val: Scene.frame_current expected an int type, not float

When I look at the code, they are correct, it’s a typo by the author. Apparently in 2.93 these errors were ignored. Is there a way in the add-on code to tell python to ignore it now?

Thanks,
Cal

No. If you’re willing to modify the addon anyway, why not just cast it to an int and be done with it?

Ahhh… but there in lies the rub.

Fix one, and another pops up. And again, and again. It gets tedious. I just use 2.93 to do what I need, and append it into my 3.3.1 project.

Right- but there have been API changes since 2.9x, so the chances are high you’d end up playing whack-a-mole with errors anyway until the addon was properly ported. Might be best to just contact the addon dev and see if they will update it.

1 Like