ayon-backend icon indicating copy to clipboard operation
ayon-backend copied to clipboard

Reserved link types

Open martastain opened this issue 10 months ago • 2 comments

Story

We'll need to reserve some basic built-in link types that we are using all across the board in pipeline code.

Namely:

  • reference|version|version
  • generative|version|version
  • breakdown|folder|folder
  • workflow|task|task

these four have special pusposes and we should be able to rely on them heavily in various automation.

Proposed solution

The easiest solution would be just to create a validator for the link types field of the Anatomy model. But from the UX perspective, we should also allow setting certain items in list[Submodel] fields as read only/non-removable.

martastain avatar Apr 16 '24 12:04 martastain

This would help us, but the same issue will exists between other addons using the links.

A more generic solution would be to namespace/prefix the links types like ayon.reference, ayon.generative...

Internal link type could be dundered, as it is a pretty classic way to handle that situation: __reference__, __generative__, but IMO a prefix would make it more obvious to external addon devs that they should prefix their link types.

dee-ynput avatar May 13 '24 09:05 dee-ynput

That in general is a good approach, however we can't now change how we name the links. We could however introduce this affiliation in metadata quite easily.

mkolar avatar Sep 17 '24 13:09 mkolar