Skip to content

Commit

Permalink
Fix #69
Browse files Browse the repository at this point in the history
  • Loading branch information
mottosso committed Jul 31, 2019
1 parent f7c09c3 commit b91d871
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions allzpark/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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"]]
Expand Down

0 comments on commit b91d871

Please sign in to comment.