From b91d871b60aefba65de909872c732bb93e21ced7 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 31 Jul 2019 07:56:23 +0100 Subject: [PATCH] Fix #69 --- allzpark/control.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/allzpark/control.py b/allzpark/control.py index 30df8e1..d024b20 100644 --- a/allzpark/control.py +++ b/allzpark/control.py @@ -990,7 +990,6 @@ def _list_apps(self, profile): # Optional patch patch = self._state.retrieve("patch", "").split() package_filter = self._package_filter() - app_packages = [] contexts = odict() with util.timing() as t: @@ -1005,9 +1004,6 @@ def _list_apps(self, profile): variants = list(profile.iter_variants()) variant = variants[0] - # Keep for later - app_packages += [app_package] - if len(variants) > 1: # Unsure of whether this is desirable. It would enable # a profile per platform, or potentially other kinds @@ -1079,22 +1075,20 @@ def _list_apps(self, profile): self.debug("Resolved all contexts in %.2f seconds" % t.duration) - # Find resolved app version - # E.g. maya -> maya-2018.0.1 + # Hide hidden + visible_apps = [] show_hidden = self._state.retrieve("showHiddenApps") - for package in app_packages[:]: + for request, package in self._state["rezApps"].items(): data = allzparkconfig.metadata_from_package(package) hidden = data.get("hidden", False) if hidden and not show_hidden: - package.hidden = True - app_packages.remove(package) + continue - if isinstance(context, model.BrokenContext): - package.broken = True + visible_apps += [package] self._state["rezContexts"] = contexts - return app_packages + return visible_apps def graph(self): context = self._state["rezContexts"][self._state["appRequest"]]