mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
renamed 'get_referenced_containers' -> 'get_containers'
This commit is contained in:
parent
96218779a2
commit
918ee53183
3 changed files with 6 additions and 6 deletions
|
|
@ -234,14 +234,14 @@ class ILoadHost:
|
|||
raise MissingMethodsError(host, missing)
|
||||
|
||||
@abstractmethod
|
||||
def get_referenced_containers(self):
|
||||
def get_containers(self):
|
||||
"""Retreive referenced containers from scene.
|
||||
|
||||
This can be implemented in hosts where referencing can be used.
|
||||
|
||||
Todo:
|
||||
Rename function to something more self explanatory.
|
||||
Suggestion: 'get_referenced_containers'
|
||||
Suggestion: 'get_containers'
|
||||
|
||||
Returns:
|
||||
list[dict]: Information about loaded containers.
|
||||
|
|
@ -251,13 +251,13 @@ class ILoadHost:
|
|||
|
||||
# --- Deprecated method names ---
|
||||
def ls(self):
|
||||
"""Deprecated variant of 'get_referenced_containers'.
|
||||
"""Deprecated variant of 'get_containers'.
|
||||
|
||||
Todo:
|
||||
Remove when all usages are replaced.
|
||||
"""
|
||||
|
||||
return self.get_referenced_containers()
|
||||
return self.get_containers()
|
||||
|
||||
|
||||
@six.add_metaclass(ABCMeta)
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class MayaHost(HostBase, IWorkfileHost, ILoadHost):
|
|||
def get_workfile_extensions(self):
|
||||
return file_extensions()
|
||||
|
||||
def get_referenced_containers(self):
|
||||
def get_containers(self):
|
||||
return ls()
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ class InventoryModel(TreeModel):
|
|||
host = registered_host()
|
||||
if not items: # for debugging or testing, injecting items from outside
|
||||
if isinstance(host, ILoadHost):
|
||||
items = host.get_referenced_containers()
|
||||
items = host.get_containers()
|
||||
else:
|
||||
items = host.ls()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue