Added sanity check baseline made by claude.
Also changed the location to a panel in VIEW_3D instead of menu.
This commit is contained in:
1 parent
71b1a61b5c
commit
4617c47ad0
33 files changed
+2771
-52
No files matched your search
+34
-5
@@ -1,3 +1,19 @@
|
||||
import sys
|
||||
|
||||
# Reload support: drop our cached submodules so "Reload Scripts" and
|
||||
# disable/enable pick up edits in every file, not only this one.
|
||||
for _name in [name for name in sys.modules if name.startswith(__name__ + ".")]:
|
||||
del sys.modules[_name]
|
||||
|
||||
import bpy # noqa: E402
|
||||
from bpy.app.handlers import persistent # noqa: E402
|
||||
|
||||
from . import checks, core, tools_ops, ui # noqa: E402
|
||||
from .core import runner # noqa: E402
|
||||
|
||||
api = core
|
||||
|
||||
# Old bl_info to be able to develop on live code
|
||||
bl_info = {
|
||||
"name": "Melvile Tools",
|
||||
"author": "Walking The Dog (WTD)",
|
||||
@@ -11,19 +27,32 @@ bl_info = {
|
||||
"category": [],
|
||||
}
|
||||
|
||||
import bpy
|
||||
|
||||
# Import modules
|
||||
from . import ops, ui
|
||||
@persistent
|
||||
def _on_load_post(*_args):
|
||||
runner.clear()
|
||||
|
||||
|
||||
def _load_config_override():
|
||||
prefs = ui.properties.get_prefs()
|
||||
ui.properties.load_config_override(prefs.config_path if prefs else "")
|
||||
|
||||
|
||||
# Register modules
|
||||
def register() -> None:
|
||||
ops.register()
|
||||
tools_ops.register()
|
||||
checks.load_all()
|
||||
ui.register()
|
||||
_load_config_override()
|
||||
bpy.app.handlers.load_post.append(_on_load_post)
|
||||
|
||||
|
||||
# Unregister modules
|
||||
def unregister() -> None:
|
||||
ops.unregister()
|
||||
tools_ops.unregister()
|
||||
if _on_load_post in bpy.app.handlers.load_post:
|
||||
bpy.app.handlers.load_post.remove(_on_load_post)
|
||||
ui.unregister()
|
||||
runner.clear()
|
||||
# The check registry is plain Python and is rebuilt with the modules on
|
||||
# re-import, so it is kept as is (enable/disable without re-import).
|
||||
Reference in new issue
Block a user