mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Convert imageseuqnece loader
This commit is contained in:
parent
279b221e33
commit
1a15dc78ce
3 changed files with 10 additions and 8 deletions
|
|
@ -124,7 +124,9 @@ def check_inventory():
|
|||
outdated_nodes = []
|
||||
for container in outdated_containers:
|
||||
if container["loader"] == "ImageSequenceLoader":
|
||||
outdated_nodes.append(container["name"])
|
||||
outdated_nodes.append(
|
||||
harmony.find_node_by_name(container["name"]), "READ"
|
||||
)
|
||||
harmony.send({"function": func, "args": [outdated_nodes]})
|
||||
|
||||
# Warn about outdated containers.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import uuid
|
||||
|
||||
import clique
|
||||
|
||||
|
|
@ -252,15 +253,15 @@ class ImageSequenceLoader(api.Loader):
|
|||
).replace("\\", "/")
|
||||
)
|
||||
|
||||
name = context["subset"]["name"]
|
||||
name += "_{}".format(uuid.uuid4())
|
||||
read_node = harmony.send(
|
||||
{
|
||||
"function": copy_files + import_files,
|
||||
"args": ["Top", files, context["subset"]["name"], 1]
|
||||
"args": ["Top", files, name, 1]
|
||||
}
|
||||
)["result"]
|
||||
|
||||
self[:] = [read_node]
|
||||
|
||||
return harmony.containerise(
|
||||
name,
|
||||
namespace,
|
||||
|
|
@ -270,7 +271,7 @@ class ImageSequenceLoader(api.Loader):
|
|||
)
|
||||
|
||||
def update(self, container, representation):
|
||||
node = container.pop("node")
|
||||
node = harmony.find_node_by_name(container["name"], "READ")
|
||||
|
||||
path = api.get_representation_path(representation)
|
||||
collections, remainder = clique.assemble(
|
||||
|
|
@ -324,7 +325,8 @@ class ImageSequenceLoader(api.Loader):
|
|||
)
|
||||
|
||||
def remove(self, container):
|
||||
node = container.pop("node")
|
||||
node = harmony.find_node_by_name(container["name"], "READ")
|
||||
|
||||
func = """function deleteNode(_node)
|
||||
{
|
||||
node.deleteNode(_node, true, true);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ import os
|
|||
import shutil
|
||||
import uuid
|
||||
|
||||
from bson.objectid import ObjectId
|
||||
|
||||
from avalon import api, harmony
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue