From 1b1ce1f2a5602b07714f19e8aeb0404ba072f7f7 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 28 Jun 2021 19:59:07 +0200 Subject: [PATCH] modified _prepare_entity_layouts to be able to store result into passed dictionary --- openpype/tools/settings/settings/dict_conditional.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/openpype/tools/settings/settings/dict_conditional.py b/openpype/tools/settings/settings/dict_conditional.py index 2024bd3258..aeb2b7d86c 100644 --- a/openpype/tools/settings/settings/dict_conditional.py +++ b/openpype/tools/settings/settings/dict_conditional.py @@ -52,8 +52,10 @@ class DictConditionalWidget(BaseWidget): self.entity_widget.add_widget_to_layout(self, label) - def _prepare_entity_layouts(self, children, widget): - for child in children: + def _prepare_entity_layouts( + self, gui_layout, widget, parent_widget_by_entity_id + ): + for child in gui_layout: if not isinstance(child, dict): parent_widget_by_entity_id[child.id] = widget continue @@ -69,9 +71,11 @@ class DictConditionalWidget(BaseWidget): "Unknown Wrapper type \"{}\"".format(child["type"]) ) - self._parent_widget_by_entity_id[wrapper.id] = widget + parent_widget_by_entity_id[wrapper.id] = widget - self._prepare_entity_layouts(child["children"], wrapper) + self._prepare_entity_layouts( + child["children"], wrapper, parent_widget_by_entity_id + ) def _ui_item_base(self): self.setObjectName("DictInvisible")