From b4ff20c01cb0c57ed7527e3517ae620be268b348 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 9 Nov 2021 13:44:30 +0100 Subject: [PATCH] OP-1906 - refactor - renamed progress role to availability role Progress and Availability is different, one is in percentage, second one is for full presence --- openpype/tools/loader/model.py | 8 ++++---- openpype/tools/loader/widgets.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openpype/tools/loader/model.py b/openpype/tools/loader/model.py index 42cd80844d..d81fc11cf2 100644 --- a/openpype/tools/loader/model.py +++ b/openpype/tools/loader/model.py @@ -18,8 +18,8 @@ from openpype.modules import ModulesManager from openpype.tools.utils.constants import ( LOCAL_PROVIDER_ROLE, REMOTE_PROVIDER_ROLE, - LOCAL_PROGRESS_ROLE, - REMOTE_PROGRESS_ROLE + LOCAL_AVAILABILITY_ROLE, + REMOTE_AVAILABILITY_ROLE ) @@ -728,13 +728,13 @@ class SubsetsModel(TreeModel, BaseRepresentationModel): if not version_doc["is_from_latest"]: return self.not_last_hero_brush - elif role == LOCAL_PROGRESS_ROLE: + elif role == LOCAL_AVAILABILITY_ROLE: if not item.get("isGroup"): return item.get("repre_info_local") else: return None - elif role == REMOTE_PROGRESS_ROLE: + elif role == REMOTE_AVAILABILITY_ROLE: if not item.get("isGroup"): return item.get("repre_info_remote") else: diff --git a/openpype/tools/loader/widgets.py b/openpype/tools/loader/widgets.py index 9c4a221e43..08b58eebbe 100644 --- a/openpype/tools/loader/widgets.py +++ b/openpype/tools/loader/widgets.py @@ -34,8 +34,8 @@ from . import lib from openpype.tools.utils.constants import ( LOCAL_PROVIDER_ROLE, REMOTE_PROVIDER_ROLE, - LOCAL_PROGRESS_ROLE, - REMOTE_PROGRESS_ROLE + LOCAL_AVAILABILITY_ROLE, + REMOTE_AVAILABILITY_ROLE ) @@ -1608,8 +1608,8 @@ class AvailabilityDelegate(QtWidgets.QStyledItemDelegate): provider_active = index.data(LOCAL_PROVIDER_ROLE) provider_remote = index.data(REMOTE_PROVIDER_ROLE) - availability_active = index.data(LOCAL_PROGRESS_ROLE) - availability_remote = index.data(REMOTE_PROGRESS_ROLE) + availability_active = index.data(LOCAL_AVAILABILITY_ROLE) + availability_remote = index.data(REMOTE_AVAILABILITY_ROLE) if not availability_active or not availability_remote: # group lines return