From 45a6fa1ea5ab83fc6e82a6d60fea00f76990dc63 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 7 Jul 2021 20:35:28 +0200 Subject: [PATCH] store projects on project change to settings --- .../tools/standalonepublish/widgets/widget_asset.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openpype/tools/standalonepublish/widgets/widget_asset.py b/openpype/tools/standalonepublish/widgets/widget_asset.py index 24b93c8343..683b05d836 100644 --- a/openpype/tools/standalonepublish/widgets/widget_asset.py +++ b/openpype/tools/standalonepublish/widgets/widget_asset.py @@ -255,6 +255,16 @@ class AssetWidget(QtWidgets.QWidget): project_name = self.combo_projects.currentText() if project_name in projects: self.dbcon.Session["AVALON_PROJECT"] = project_name + last_projects = [ + value + for value in self._settings.value("projects", "").split("|") + ] + if project_name in last_projects: + last_projects.remove(project_name) + last_projects.insert(0, project_name) + while len(last_projects) > 5: + last_projects.pop(-1) + self._settings.setValue("projects", "|".join(last_projects)) self.project_changed.emit(project_name)