mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
texture copy now works without registered_root
This commit is contained in:
parent
03c1285f2d
commit
50bd855fb1
1 changed files with 14 additions and 14 deletions
|
|
@ -46,25 +46,25 @@ class TextureCopy:
|
|||
return asset
|
||||
|
||||
def _get_destination_path(self, asset, project):
|
||||
root = api.registered_root()
|
||||
PROJECT = api.Session["AVALON_PROJECT"]
|
||||
project_name = api.Session["AVALON_PROJECT"]
|
||||
hierarchy = ""
|
||||
parents = asset['data']['parents']
|
||||
if parents and len(parents) > 0:
|
||||
hierarchy = os.path.join(*parents)
|
||||
|
||||
template_data = {"root": root,
|
||||
"project": {"name": PROJECT,
|
||||
"code": project['data']['code']},
|
||||
"silo": asset.get('silo'),
|
||||
"asset": asset['name'],
|
||||
"family": 'texture',
|
||||
"subset": 'Main',
|
||||
"hierarchy": hierarchy}
|
||||
anatomy = Anatomy()
|
||||
anatomy_filled = os.path.normpath(
|
||||
anatomy.format(template_data)['texture']['path'])
|
||||
return anatomy_filled
|
||||
template_data = {
|
||||
"project": {
|
||||
"name": project_name,
|
||||
"code": project['data']['code']
|
||||
},
|
||||
"silo": asset.get('silo'),
|
||||
"asset": asset['name'],
|
||||
"family": 'texture',
|
||||
"subset": 'Main',
|
||||
"hierarchy": hierarchy
|
||||
}
|
||||
anatomy_filled = Anatomy(project_name).format(template_data)
|
||||
return os.path.normpath(anatomy_filled['texture']['path'])
|
||||
|
||||
def _get_version(self, path):
|
||||
versions = [0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue