Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Settings schema without prefill #1753

Merged
merged 19 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion openpype/settings/entities/base_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,11 @@ def schema_validations(self):

def create_schema_object(self, *args, **kwargs):
"""Reference method for creation of entities defined in RootEntity."""
return self.root_item.create_schema_object(*args, **kwargs)
return self.schema_hub.create_schema_object(*args, **kwargs)

@property
def schema_hub(self):
return self.root_item.schema_hub

def get_entity_from_path(self, path):
return self.root_item.get_entity_from_path(path)
Expand Down
12 changes: 11 additions & 1 deletion openpype/settings/entities/dict_immutable_keys_entity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import copy
import collections

from .lib import (
WRAPPER_TYPES,
Expand Down Expand Up @@ -138,7 +139,16 @@ def _add_children(self, schema_data, first=True):
method when handling gui wrappers.
"""
added_children = []
for children_schema in schema_data["children"]:
children_deque = collections.deque()
for _children_schema in schema_data["children"]:
children_schemas = self.schema_hub.resolve_schema_data(
_children_schema
)
for children_schema in children_schemas:
children_deque.append(children_schema)

while children_deque:
children_schema = children_deque.popleft()
if children_schema["type"] in WRAPPER_TYPES:
_children_schema = copy.deepcopy(children_schema)
wrapper_children = self._add_children(
Expand Down
Loading