Copy-paste current implementation of core LoadImage, but use a string input providing an entity reference instead of a file upload, and retrieve input file path from the OpenAssetIO manager. Due to the mix-and-match by ComfyUI of class vs. instance methods, plus no way to inject context, use a singleton class to represent the OpenAssetIO host application. Signed-off-by: David Feltell <david.feltell@foundry.com>
28 lines
626 B
JSON
28 lines
626 B
JSON
{
|
|
"entities": {
|
|
"image_file": {
|
|
"versions": [
|
|
{
|
|
"traits": {
|
|
"openassetio-mediacreation:usage.Entity": {},
|
|
"openassetio-mediacreation:twoDimensional.Image": {},
|
|
"openassetio-mediacreation:content.LocatableContent": {
|
|
"location": "file://${test_tmp_dir}/cat.png"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"no_file": {
|
|
"versions": [
|
|
{
|
|
"traits": {
|
|
"openassetio-mediacreation:usage.Entity": {},
|
|
"openassetio-mediacreation:twoDimensional.Image": {}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|