Report when register_class overrides classes with the same bl_idname #116374

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:116370 into main 2024-01-16 14:43:50 +01:00

1 Commits

Author SHA1 Message Date
Philipp Oeser 2d4db8b318 Report when `register_class` overrides classes with the same bl_idname
The unregistering of already registered classes is expected behavior,
however this was done silently and can be unsafe as two Addons may have
the same names for operators and in case of name collision the addon
registered first will break silently / start behave unexpectedly.
So reporting the unregister step seems reasonable.

During Addon development, this might seem noisy when classes are
frequently updated, however catching the problematic cases instead of
being silent might be beneficial.

Part of #116370
2023-12-20 12:39:55 +01:00