OpenPype icon indicating copy to clipboard operation
OpenPype copied to clipboard

Pype 4: Define representation as data class

Open antirotor opened this issue 4 years ago • 4 comments

Problem

Current use of representation data as normal dict is pretty wild as we depend on its values but we are not enforcing them anyhow. It lacks proper documentation and is not very developer friendly. I propose to use attrs module we already have in dependencies for it - it provides clear interface for data classes in python and proper serialization so code impact should be minimal.

[cuID:OP-1188]

antirotor avatar Apr 15 '21 14:04 antirotor

representation should take into account file we aren't tracking now - those copied to resources folder, like textures in lookdev, etc.

antirotor avatar Jun 23 '21 14:06 antirotor

It would be good to keep metadata about files in representation like resolution, fps, codec, frames (list?) so each part of publishing don't have to get or guess that information.

iLLiCiTiT avatar Apr 19 '22 16:04 iLLiCiTiT

We have started to map all currently used families and their representations with some attributes. The work is aimed mostly to help with discussion and implementation of OpenAssetIO down the line, but it is directly related to this issue as well. Feel free to have a look and leave comment. The most important is the last sheet with the target state for v4 https://docs.google.com/spreadsheets/d/1PtnKuYBL8tVkQdabX95T2w0b_Xj06gkdTzpvdNGAYMM/edit#gid=165858577

mkolar avatar Jun 07 '22 20:06 mkolar