mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
use new functions in get_available_versions
This commit is contained in:
parent
6762d66459
commit
73f2981987
1 changed files with 3 additions and 21 deletions
|
|
@ -479,29 +479,11 @@ class OpenPypeVersion(semver.VersionInfo):
|
|||
local (bool, optional): List only local versions.
|
||||
|
||||
"""
|
||||
registry = OpenPypeSettingsRegistry()
|
||||
dir_to_search = Path(user_data_dir("openpype", "pypeclub"))
|
||||
user_versions = OpenPypeVersion.get_versions_from_directory(
|
||||
dir_to_search)
|
||||
user_versions = cls.get_local_versions()
|
||||
# if we have openpype_path specified, search only there.
|
||||
|
||||
openpype_versions = []
|
||||
if not local:
|
||||
if os.getenv("OPENPYPE_PATH"):
|
||||
if Path(os.getenv("OPENPYPE_PATH")).exists():
|
||||
dir_to_search = Path(os.getenv("OPENPYPE_PATH"))
|
||||
else:
|
||||
try:
|
||||
registry_dir = Path(
|
||||
str(registry.get_item("openPypePath")))
|
||||
if registry_dir.exists():
|
||||
dir_to_search = registry_dir
|
||||
|
||||
except ValueError:
|
||||
# nothing found in registry, we'll use data dir
|
||||
pass
|
||||
|
||||
openpype_versions = OpenPypeVersion.get_versions_from_directory(
|
||||
dir_to_search)
|
||||
openpype_versions = cls.get_remote_versions()
|
||||
openpype_versions += user_versions
|
||||
|
||||
# remove duplicates and staging/production
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue