mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
change return type of 'get_creator_attribute_definitions'
This commit is contained in:
parent
7d2e676f52
commit
ecc7d2bde9
2 changed files with 17 additions and 6 deletions
|
|
@ -366,7 +366,7 @@ class AbstractPublisherFrontend(AbstractPublisherCommon):
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_creator_attribute_definitions(
|
def get_creator_attribute_definitions(
|
||||||
self, instance_ids: Iterable[str]
|
self, instance_ids: Iterable[str]
|
||||||
) -> List[Tuple[AbstractAttrDef, List[str], List[Any]]]:
|
) -> List[Tuple[AbstractAttrDef, Dict[str, Dict[str, Any]]]]:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
|
|
||||||
|
|
@ -769,7 +769,7 @@ class CreateModel:
|
||||||
|
|
||||||
def get_creator_attribute_definitions(
|
def get_creator_attribute_definitions(
|
||||||
self, instance_ids: List[str]
|
self, instance_ids: List[str]
|
||||||
) -> List[Tuple[AbstractAttrDef, List[str], List[Any]]]:
|
) -> List[Tuple[AbstractAttrDef, Dict[str, Dict[str, Any]]]]:
|
||||||
"""Collect creator attribute definitions for multuple instances.
|
"""Collect creator attribute definitions for multuple instances.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -796,12 +796,23 @@ class CreateModel:
|
||||||
|
|
||||||
if found_idx is None:
|
if found_idx is None:
|
||||||
idx = len(output)
|
idx = len(output)
|
||||||
output.append((attr_def, [instance_id], [value]))
|
output.append((
|
||||||
|
attr_def,
|
||||||
|
{
|
||||||
|
instance_id: {
|
||||||
|
"value": value,
|
||||||
|
"default": attr_def.default
|
||||||
|
}
|
||||||
|
}
|
||||||
|
))
|
||||||
_attr_defs[idx] = attr_def
|
_attr_defs[idx] = attr_def
|
||||||
else:
|
else:
|
||||||
_, ids, values = output[found_idx]
|
_, info_by_id = output[found_idx]
|
||||||
ids.append(instance_id)
|
info_by_id[instance_id] = {
|
||||||
values.append(value)
|
"value": value,
|
||||||
|
"default": attr_def.default
|
||||||
|
}
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def set_instances_publish_attr_values(
|
def set_instances_publish_attr_values(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue