Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/AY-5045_AE-switching-asset-from-mo…
Browse files Browse the repository at this point in the history
…vmp4-to-image-sequence
  • Loading branch information
moonyuet authored Jun 7, 2024
2 parents 73b20d8 + 2aa6206 commit 52a597c
Show file tree
Hide file tree
Showing 734 changed files with 266 additions and 181,033 deletions.
6 changes: 3 additions & 3 deletions client/ayon_core/addon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ AYON addons should contain separated logic of specific kind of implementation, s
- addon has more logic when used in a tray
- it is possible that addon can be used only in the tray
- abstract methods
- `tray_init` - initialization triggered after `initialize` when used in `TrayModulesManager` and before `connect_with_addons`
- `tray_init` - initialization triggered after `initialize` when used in `TrayAddonsManager` and before `connect_with_addons`
- `tray_menu` - add actions to tray widget's menu that represent the addon
- `tray_start` - start of addon's login in tray
- addon is initialized and connected with other addons
- `tray_exit` - addon's cleanup like stop and join threads etc.
- order of calling is based on implementation this order is how it works with `TrayModulesManager`
- order of calling is based on implementation this order is how it works with `TrayAddonsManager`
- it is recommended to import and use GUI implementation only in these methods
- has attribute `tray_initialized` (bool) which is set to False by default and is set by `TrayModulesManager` to True after `tray_init`
- has attribute `tray_initialized` (bool) which is set to False by default and is set by `TrayAddonsManager` to True after `tray_init`
- if addon has logic only in tray or for both then should be checking for `tray_initialized` attribute to decide how should handle situations

### ITrayService
Expand Down
23 changes: 4 additions & 19 deletions client/ayon_core/addon/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@
"base.py",
"interfaces.py",
"click_wrap.py",
"example_addons",
"default_modules",
)
IGNORED_HOSTS_IN_AYON = {
"flame",
"harmony",
}
IGNORED_MODULES_IN_AYON = set()

# When addon was moved from ayon-core codebase
# - this is used to log the missing addon
Expand All @@ -54,12 +47,14 @@
"blender": VersionInfo(0, 2, 0),
"celaction": VersionInfo(0, 2, 0),
"clockify": VersionInfo(0, 2, 0),
"deadline": VersionInfo(0, 2, 0),
"flame": VersionInfo(0, 2, 0),
"fusion": VersionInfo(0, 2, 0),
"harmony": VersionInfo(0, 2, 0),
"hiero": VersionInfo(0, 2, 0),
"max": VersionInfo(0, 2, 0),
"photoshop": VersionInfo(0, 2, 0),
"timers_manager": VersionInfo(0, 2, 0),
"traypublisher": VersionInfo(0, 2, 0),
"tvpaint": VersionInfo(0, 2, 0),
"maya": VersionInfo(0, 2, 0),
Expand Down Expand Up @@ -418,12 +413,6 @@ def _load_addons_in_core(
hosts_dir = os.path.join(AYON_CORE_ROOT, "hosts")
modules_dir = os.path.join(AYON_CORE_ROOT, "modules")

ignored_host_names = set(IGNORED_HOSTS_IN_AYON)
ignored_module_dir_filenames = (
set(IGNORED_DEFAULT_FILENAMES)
| IGNORED_MODULES_IN_AYON
)

for dirpath in {hosts_dir, modules_dir}:
if not os.path.exists(dirpath):
log.warning((
Expand All @@ -432,10 +421,9 @@ def _load_addons_in_core(
continue

is_in_modules_dir = dirpath == modules_dir
ignored_filenames = set()
if is_in_modules_dir:
ignored_filenames = ignored_module_dir_filenames
else:
ignored_filenames = ignored_host_names
ignored_filenames = set(IGNORED_DEFAULT_FILENAMES)

for filename in os.listdir(dirpath):
# Ignore filenames
Expand Down Expand Up @@ -501,9 +489,6 @@ def _load_addons_in_core(


def _load_addons():
# Support to use 'openpype' imports
sys.modules["openpype"] = sys.modules["ayon_core"]

# Key under which will be modules imported in `sys.modules`
modules_key = "openpype_modules"

Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def main(*args, **kwargs):
os.path.join(AYON_CORE_ROOT, "tools"),
# add common AYON vendor
# (common for multiple Python interpreter versions)
os.path.join(AYON_CORE_ROOT, "vendor", "python", "common")
os.path.join(AYON_CORE_ROOT, "vendor", "python")
]
for path in additional_paths:
if path not in split_paths:
Expand Down
13 changes: 0 additions & 13 deletions client/ayon_core/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# -*- coding: utf-8 -*-
# flake8: noqa E402
"""AYON lib functions."""
# add vendor to sys path based on Python version
import sys
import os
import site
from ayon_core import AYON_CORE_ROOT

# Add Python version specific vendor folder
python_version_dir = os.path.join(
AYON_CORE_ROOT, "vendor", "python", "python_{}".format(sys.version[0])
)
# Prepend path in sys paths
sys.path.insert(0, python_version_dir)
site.addsitedir(python_version_dir)

from .local_settings import (
IniSettingRegistry,
Expand Down
1 change: 0 additions & 1 deletion client/ayon_core/modules/deadline/version.py

This file was deleted.

1 change: 0 additions & 1 deletion client/ayon_core/modules/job_queue/version.py

This file was deleted.

1 change: 0 additions & 1 deletion client/ayon_core/modules/timers_manager/version.py

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions client/ayon_core/vendor/python/python_2/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions client/ayon_core/vendor/python/python_2/arrow/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion client/ayon_core/vendor/python/python_2/arrow/_version.py

This file was deleted.

54 changes: 0 additions & 54 deletions client/ayon_core/vendor/python/python_2/arrow/api.py

This file was deleted.

Loading

0 comments on commit 52a597c

Please sign in to comment.