ynput / ayon-backend

Server codebase with API access to AYON
Apache License 2.0
22 stars 17 forks source link

Reserved link types #144

Open martastain opened 7 months ago

martastain commented 7 months ago

Story

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

Namely:

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.

dee-ynput commented 6 months ago

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.

mkolar commented 2 months ago

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.