Skip to content

Commit

Permalink
pinning file creation now allows to create pinning file for rel paths…
Browse files Browse the repository at this point in the history
… via rootles paths
  • Loading branch information
ynput committed Sep 9, 2024
1 parent e1e4a3b commit fefa609
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions client/ayon_usd/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def initialize(self, module_settings):
)
self.enabled = True
self._download_window = None
print(DOWNLOAD_DIR)

def tray_start(self):
"""Start tray module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def _replace_match(match: re.Match):
rootless_dependency_info = {}
for key, path in dependency_info.items():
new_path = regx.sub(_replace_match, path)
rootless_dependency_info[key] = new_path
new_key = regx.sub(_replace_match, key)

rootless_dependency_info[new_key] = new_path

return rootless_dependency_info

Expand Down Expand Up @@ -180,20 +182,27 @@ def get_asset_dependencies(
asset_identifier_list: List[str] = layer.GetCompositionAssetDependencies()

for ref in asset_identifier_list:

resolved_path = resolver.Resolve(layer.ComputeAbsolutePath(ref))

ref = _remove_sdf_args(ref)

resolved_path_str = resolved_path.GetPathString()
identifier_to_path[ref] = resolved_path_str
search_path_string = ""
if is_uri(ref):
search_path_string = ref
else:
search_path_string = resolved_path_str


identifier_to_path[search_path_string] = resolved_path_str


recursive_result = get_asset_dependencies(
resolved_path_str,
search_path_string,
resolver,
processed_layers,
)
identifier_to_path.update(recursive_result)

return identifier_to_path


Expand Down

0 comments on commit fefa609

Please sign in to comment.