Plugin work

This commit is contained in:
2022-09-04 22:35:30 -05:00
parent aabcd46d75
commit 3d0a714106
14 changed files with 1122 additions and 267 deletions

View File

@@ -50,7 +50,8 @@ class ManifestProcessor:
if "ui_target" in keys:
if requests["ui_target"] in [
"none", "other", "main_Window", "main_menu_bar", "path_menu_bar", "plugin_control_list",
"none", "other", "main_Window", "main_menu_bar",
"main_menu_bttn_box_bar", "path_menu_bar", "plugin_control_list",
"context_menu", "window_1", "window_2", "window_3", "window_4"
]:
if requests["ui_target"] == "other":

View File

@@ -65,7 +65,9 @@ class Plugins:
def load_plugin_module(self, path, folder, target):
os.chdir(path)
sys.path.insert(0, path)
sys.path.insert(0, path) # NOTE: I think I'm not using this correctly...
# The folder and target aren't working to create parent package references, so using as stopgap.
# The above is probably polutling import logic and will cause unforseen import issues.
spec = importlib.util.spec_from_file_location(folder, target)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)