Initial commit of roots entity

This commit is contained in:
iLLiCiTiT 2021-10-27 17:29:39 +02:00
parent 4598908382
commit f5225b1b4e
2 changed files with 17 additions and 1 deletions

View file

@ -110,7 +110,10 @@ from .enum_entity import (
)
from .list_entity import ListEntity
from .dict_immutable_keys_entity import DictImmutableKeysEntity
from .dict_immutable_keys_entity import (
DictImmutableKeysEntity,
RootsEntity
)
from .dict_mutable_keys_entity import DictMutableKeysEntity
from .dict_conditional import (
DictConditionalEntity,
@ -169,6 +172,7 @@ __all__ = (
"ListEntity",
"DictImmutableKeysEntity",
"RootsEntity",
"DictMutableKeysEntity",

View file

@ -547,3 +547,15 @@ class DictImmutableKeysEntity(ItemEntity):
super(DictImmutableKeysEntity, self).reset_callbacks()
for child_entity in self.children:
child_entity.reset_callbacks()
class RootsEntity(DictImmutableKeysEntity):
"""Entity that adds ability to fill value for roots of current project.
Value schema is defined by `object_type`.
It is not possible to change override state (Studio values will always
contain studio overrides and same for project). That is because roots can
be totally different for each project.
"""
schema_types = ["dict-roots"]