mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
modified how preparation of layout works
This commit is contained in:
parent
9131982be4
commit
84f725b364
1 changed files with 16 additions and 3 deletions
|
|
@ -40,9 +40,22 @@ class DictConditionalWidget(BaseWidget):
|
|||
self._parent_widget_by_entity_id = {}
|
||||
self._enum_key_by_wrapper_id = {}
|
||||
self._added_wrapper_ids = set()
|
||||
self._prepare_entity_layouts(
|
||||
self.entity.gui_layout, self.content_widget
|
||||
)
|
||||
|
||||
# Add enum entity to layout mapping
|
||||
enum_entity = self.entity.enum_entity
|
||||
self._parent_widget_by_entity_id[enum_entity.id] = self.content_widget
|
||||
|
||||
# Add rest of entities to wrapper mappings
|
||||
for enum_key, children in self.entity.gui_layout.items():
|
||||
parent_widget_by_entity_id = {}
|
||||
self._prepare_entity_layouts(
|
||||
children,
|
||||
self.content_widget,
|
||||
parent_widget_by_entity_id
|
||||
)
|
||||
for item_id in parent_widget_by_entity_id.keys():
|
||||
self._enum_key_by_wrapper_id[item_id] = enum_key
|
||||
self._parent_widget_by_entity_id.update(parent_widget_by_entity_id)
|
||||
|
||||
for child_obj in self.entity.children:
|
||||
self.input_fields.append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue