diff --git a/pype/tools/tray/pype_tray.py b/pype/tools/tray/pype_tray.py index ea28104d69..d73c1cd0ce 100644 --- a/pype/tools/tray/pype_tray.py +++ b/pype/tools/tray/pype_tray.py @@ -61,35 +61,29 @@ class TrayManager: In this case `Statics Server` won't be used. """ - # Backwards compatible presets loading - if isinstance(self.items, list): - items = self.items - else: - items = [] - # Get booleans is module should be used - usages = self.items.get("item_usage") or {} - attributes = self.items.get("attributes") or {} - for item in self.items.get("item_import", []): - import_path = item.get("import_path") - title = item.get("title") + items = [] + # Get booleans is module should be used + for item in self.modules_imports: + import_path = item.get("import_path") + title = item.get("title") - item_usage = usages.get(title) - if item_usage is None: - item_usage = usages.get(import_path, True) - - if not item_usage: - if not title: - title = import_path - self.log.debug("{} - Module ignored".format(title)) - continue + item_usage = self.modules_usage.get(title) + if item_usage is None: + item_usage = self.modules_usage.get(import_path, True) + if item_usage: _attributes = attributes.get(title) if _attributes is None: _attributes = attributes.get(import_path) if _attributes: item["attributes"] = _attributes + items.append(item) + else: + if not title: + title = import_path + self.log.info("{} - Module ignored".format(title)) if items: self.process_items(items, self.tray_widget.menu)