add methods to get launcher action paths

This commit is contained in:
Jakub Trllo 2024-12-16 10:29:25 +01:00
parent 704b011474
commit e7d95c1d5d
2 changed files with 22 additions and 0 deletions

View file

@ -894,6 +894,21 @@ class AddonsManager:
output.extend(paths)
return output
def collect_launcher_action_paths(self):
"""Helper to collect launcher action paths from addons.
Returns:
list: List of paths to launcher actions.
"""
output = self._collect_plugin_paths(
"get_launcher_action_paths"
)
# Add default core actions
actions_dir = os.path.join(AYON_CORE_ROOT, "plugins", "actions")
output.insert(0, actions_dir)
return output
def collect_create_plugin_paths(self, host_name):
"""Helper to collect creator plugin paths from addons.

View file

@ -54,6 +54,13 @@ class IPluginPaths(AYONInterface):
paths = [paths]
return paths
def get_launcher_action_paths(self):
"""Receive launcher actions paths.
Give addons ability to add launcher actions paths.
"""
return self._get_plugin_paths_by_type("actions")
def get_create_plugin_paths(self, host_name):
"""Receive create plugin paths.