mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
controller have method to return attributes for passed instances
This commit is contained in:
parent
65e88f92bf
commit
7f69d96eb7
1 changed files with 18 additions and 0 deletions
|
|
@ -105,6 +105,24 @@ class PublisherController:
|
|||
|
||||
self.instances = instances
|
||||
|
||||
def get_family_attribute_definitions(self, instances):
|
||||
attr_defs = []
|
||||
if len(instances) == 1:
|
||||
instance = instances[0]
|
||||
family = instance.data["family"]
|
||||
creator = self.creators.get(family)
|
||||
if not creator:
|
||||
# TODO handle when creator is not available
|
||||
return
|
||||
|
||||
attr_defs = creator.get_attribute_defs()
|
||||
|
||||
else:
|
||||
# TODO mulsiselection
|
||||
pass
|
||||
|
||||
return attr_defs
|
||||
|
||||
def create(self, family, subset_name, instance_data, options):
|
||||
# QUESTION Force to return instances or call `list_instances` on each
|
||||
# creation? (`list_instances` may slow down...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue