diff --git a/pype/tools/texture_copy/app.py b/pype/tools/texture_copy/app.py index a59d30ec8b..624082f00c 100644 --- a/pype/tools/texture_copy/app.py +++ b/pype/tools/texture_copy/app.py @@ -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]