Created
February 8, 2024 12:57
-
-
Save BigRoy/18afc0cd24958ef73cfacf2371b9cd09 to your computer and use it in GitHub Desktop.
AYON Pipeline - Load a representation container instance by representation id in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openpype.pipeline.load.plugins import discover_loader_plugins | |
from openpype.pipeline.load.utils import loaders_from_representation, load_container | |
loader_name = "GpuCacheLoader" | |
representation_id = '6b7b5b6e-c677-11ee-b580-18c04d958ef6' | |
all_loaders = discover_loader_plugins() | |
loaders = loaders_from_representation(all_loaders, representation_id) | |
Loader = next((i for i in loaders if i.__name__ == loader_name), None) | |
if Loader is None: | |
raise RuntimeError | |
container_node = load_container(Loader, representation_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment