ynput / ayon-usd-resolver

Home of AYON USD resolver plugin
Apache License 2.0
4 stars 0 forks source link

[Proposal]_Pinning_File_Suport #19

Open Lypsolon opened 1 week ago

Lypsolon commented 1 week ago

Summary

Glossary of Terms

Pinning

Ayon::Uri

Rootless Path

resolved

cache Entity

path

freezing resolution data in time

Render farm/job

update assets

outside of the production network

Conceptual Framework

Conceptually, the Proposal boils down to the following:

Description

The abstract target for this feature is as follows: We need to provide the Ayon_Usd_AssetResolver with data about what Ayon::Uri should be resolved into what path. This is important for 2 Reasons

Approval

Human:

External Implementations:

To Reproduce (if issue/bug/etc)

No response

User Stories

Impact

High

Assumed Complexity

Days, Months

Impact Scale

an entire tool group

Other tools that get touched

All Dccs that have Ayon_Usd suport will be affected by this.

How it Solves the Problem

Allowing to load a file at startup will allow us to use the resolver without having to access the server;

Implementation Idea/Details

Resolver Caching and CppApi

This approach has the disadvantage that we assume that we will have all the needed paths and don't want to talk to the server, and while this is the point of this proposal, we should consider if there are edge cases that break this assumption

Technical Approach

Storing the cache in a file

writing out the file will require the following steps.

Loading the File

as Usd

We need to specify a standard in both cases, probably in a class. (we could write a class that takes all the info and has the write read operations as member functions so it can enforce the data layout on disk)

Architecture

No response

Unresolved Questions

milestones

Potential Problems

Long-term Issues

No response

Transient Problems

impacting Branches

Dependencies

No response

outgoing Dependencies

No response

dependency Issues

https://github.com/ynput/ayon-usd-resolver/issues/18 https://github.com/ynput/ayon-usd/issues/17

Dependant Branches

No response

Common Dependencies

No response

non-persistent test (e.g. development time tests)

Testing Plan (president tests)

Documentation

Maintenance

I assume the feature will require little maintenance after implementation, but new USD features or requirements, changes, and requests for different usage methods could lead to manual rework.

Risk Management

the usage of the tool should only be advised after extensive testing, and it should stay out of production until extensive testing.

Furthermore, disabling the feature would still allow using the resolver, but if we want to propose it for a render farm, this feature rollback would not be an option.

Appendices

No response

Is there an existing issue with this?

Are there any labels you wish to add?

Lypsolon commented 1 week ago

im gonna throw this this link here: its a talk between BigRoy and some other Usd users about stage traversal and getting paths. (might be useful for generating the pinning file in the end) https://academysoftwarefdn.slack.com/archives/C013Z5AMT7T/p1707348121426559

Lypsolon commented 5 days ago

We do it in JSON

Lypsolon commented 5 days ago

Usd utils have a function to get all files across the stage

BigRoy commented 5 days ago

Usd utils have a function to get all files across the stage

This topic should provide you some ways to do it:

Lypsolon commented 5 days ago

$Site_Root_Overwrite can be an environment variable and Root replace can use it