mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merged in feature/PYPE-184_format_path_silotasks (pull request #63)
hierarchy is set to empty string if no parents Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
commit
a620acac87
5 changed files with 23 additions and 13 deletions
|
|
@ -167,14 +167,16 @@ def get_hierarchy():
|
|||
string: asset hierarchy path
|
||||
|
||||
"""
|
||||
hierarchy = io.find_one({
|
||||
parents = io.find_one({
|
||||
"type": 'asset',
|
||||
"name": get_asset()}
|
||||
)['data']['parents']
|
||||
|
||||
if hierarchy:
|
||||
hierarchy = ""
|
||||
if parents and len(parents) > 0:
|
||||
# hierarchy = os.path.sep.join(hierarchy)
|
||||
return os.path.join(*hierarchy).replace("\\", "/")
|
||||
hierarchy = os.path.join(*parents).replace("\\", "/")
|
||||
return hierarchy
|
||||
|
||||
|
||||
def set_hierarchy(hierarchy):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue