mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
implemented similar logic to create attributes
This commit is contained in:
parent
d51b56821d
commit
c3aff4deb2
1 changed files with 10 additions and 2 deletions
|
|
@ -717,8 +717,16 @@ class CreateModel:
|
|||
for instance_id in instance_ids:
|
||||
instance = self._get_instance_by_id(instance_id)
|
||||
creator_attributes = instance["creator_attributes"]
|
||||
if key in creator_attributes:
|
||||
creator_attributes[key] = value
|
||||
attr_def = creator_attributes.get_attr_def(key)
|
||||
if (
|
||||
attr_def is None
|
||||
or not attr_def.is_value_def
|
||||
or not attr_def.visible
|
||||
or not attr_def.enabled
|
||||
or not attr_def.is_value_valid(value)
|
||||
):
|
||||
continue
|
||||
creator_attributes[key] = value
|
||||
|
||||
def get_creator_attribute_definitions(
|
||||
self, instance_ids: List[str]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue