mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
get_parents get parents from entity instead of getting through all parents if possible
This commit is contained in:
parent
918d23c9ab
commit
1b27cc59f8
1 changed files with 4 additions and 0 deletions
|
|
@ -219,6 +219,10 @@ class AssetWidget(QtWidgets.QWidget):
|
|||
return data
|
||||
|
||||
def get_parents(self, entity):
|
||||
ent_parents = entity.get("data", {}).get("parents")
|
||||
if ent_parents is not None and isinstance(ent_parents, list):
|
||||
return ent_parents
|
||||
|
||||
output = []
|
||||
if entity.get('data', {}).get('visualParent', None) is None:
|
||||
return output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue