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

Commit

Permalink
Merge pull request #1753 from pypeclub/feature/settings_schema_wihtou…
Browse files Browse the repository at this point in the history
…t_prefill

Settings schema without prefill
  • Loading branch information
iLLiCiTiT authored Jun 30, 2021
2 parents ebc6dee + b21f827 commit e5d30c0
Show file tree
Hide file tree
Showing 4 changed files with 554 additions and 402 deletions.
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

0 comments on commit e5d30c0

Please sign in to comment.