Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6052 from ynput/enhancement/update-ayon-api
Browse files Browse the repository at this point in the history
AYON: Update ayon api to 1.0.0-rc.3
  • Loading branch information
iLLiCiTiT authored Dec 13, 2023
2 parents 79f3422 + 7748c7b commit eb209e7
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 235 deletions.
4 changes: 0 additions & 4 deletions openpype/vendor/python/common/ayon_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
download_installer,
upload_installer,

get_dependencies_info,
update_dependency_info,
get_dependency_packages,
create_dependency_package,
update_dependency_package,
Expand Down Expand Up @@ -277,8 +275,6 @@
"download_installer",
"upload_installer",

"get_dependencies_info",
"update_dependency_info",
"get_dependency_packages",
"create_dependency_package",
"update_dependency_package",
Expand Down
10 changes: 0 additions & 10 deletions openpype/vendor/python/common/ayon_api/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,16 +611,6 @@ def upload_installer(*args, **kwargs):


# Dependency packages
def get_dependencies_info(*args, **kwargs):
con = get_server_api_connection()
return con.get_dependencies_info(*args, **kwargs)


def update_dependency_info(*args, **kwargs):
con = get_server_api_connection()
return con.update_dependency_info(*args, **kwargs)


def download_dependency_package(*args, **kwargs):
con = get_server_api_connection()
return con.download_dependency_package(*args, **kwargs)
Expand Down
23 changes: 19 additions & 4 deletions openpype/vendor/python/common/ayon_api/entity_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@
from ._api import get_server_api_connection
from .utils import create_entity_id, convert_entity_id, slugify_string

UNKNOWN_VALUE = object()
PROJECT_PARENT_ID = object()
_NOT_SET = object()

class _CustomNone(object):
def __init__(self, name=None):
self._name = name or "CustomNone"

def __repr__(self):
return "<{}>".format(self._name)

def __bool__(self):
return False


UNKNOWN_VALUE = _CustomNone("UNKNOWN_VALUE")
PROJECT_PARENT_ID = _CustomNone("PROJECT_PARENT_ID")
_NOT_SET = _CustomNone("_NOT_SET")


class EntityHub(object):
Expand Down Expand Up @@ -1284,7 +1296,10 @@ def _get_default_changes(self):
changes["name"] = self._name

if self._entity_hub.allow_data_changes:
if self._orig_data != self._data:
if (
self._data is not UNKNOWN_VALUE
and self._orig_data != self._data
):
changes["data"] = self._data

if self._orig_thumbnail_id != self._thumbnail_id:
Expand Down
Loading

0 comments on commit eb209e7

Please sign in to comment.