renamed 'load_representation' to 'load_container'

This commit is contained in:
Jakub Trllo 2022-03-15 11:40:59 +01:00
parent c5b3098acd
commit 5b835d87e7
10 changed files with 19 additions and 19 deletions

View file

@ -10,7 +10,7 @@ import bpy
from openpype.pipeline import (
discover_loader_plugins,
remove_container,
load_representation,
load_container,
get_representation_path,
loaders_from_representation,
)
@ -108,7 +108,7 @@ class JsonLayoutLoader(plugin.AssetLoader):
# at this time it will not return anything. The assets will be
# loaded in the next Blender cycle, so we use the options to
# set the transform, parent and assign the action, if there is one.
load_representation(
load_container(
loader,
reference,
namespace=instance_name,

View file

@ -25,7 +25,7 @@ from openpype.pipeline import (
discover_loader_plugins,
loaders_from_representation,
get_representation_path,
load_representation,
load_container,
)
from .commands import reset_frame_range
@ -1594,7 +1594,7 @@ def assign_look_by_version(nodes, version_id):
# Reference the look file
with maintained_selection():
container_node = load_representation(Loader, look_representation)
container_node = load_container(Loader, look_representation)
# Get container members
shader_nodes = get_container_members(container_node)

View file

@ -12,7 +12,7 @@ from avalon import io
from openpype.pipeline import (
discover_loader_plugins,
loaders_from_representation,
load_representation,
load_container,
update_container,
remove_container,
get_representation_path,
@ -189,7 +189,7 @@ def _add(instance, representation_id, loaders, namespace, root="|"):
instance['loader'], instance)
raise RuntimeError("Loader is missing.")
container = load_representation(
container = load_container(
Loader,
representation_id,
namespace=instance['namespace']

View file

@ -8,7 +8,7 @@ from bson.objectid import ObjectId
from openpype.pipeline import (
discover_loader_plugins,
load_representation,
load_container,
)
@ -59,7 +59,7 @@ class RepairReadLegacyAction(pyblish.api.Action):
loader_plugin = Loader
load_representation(
load_container(
Loader=loader_plugin,
representation=ObjectId(data["representation"])
)

View file

@ -15,7 +15,7 @@ from avalon.pipeline import AVALON_CONTAINER_ID
from openpype.pipeline import (
discover_loader_plugins,
loaders_from_representation,
load_representation,
load_container,
get_representation_path,
)
from openpype.hosts.unreal.api import plugin
@ -258,7 +258,7 @@ class LayoutLoader(plugin.Loader):
"asset_dir": asset_dir
}
assets = load_representation(
assets = load_container(
loader,
reference,
namespace=instance_name,

View file

@ -1394,7 +1394,7 @@ class BuildWorkfile:
"""
from openpype.pipeline import (
IncompatibleLoaderError,
load_representation,
load_container,
)
loaded_containers = []
@ -1458,7 +1458,7 @@ class BuildWorkfile:
if not loader:
continue
try:
container = load_representation(
container = load_container(
loader,
repre["_id"],
name=subset_name

View file

@ -24,7 +24,7 @@ from .load import (
register_loader_plugins_path,
deregister_loader_plugin,
load_representation,
load_container,
remove_container,
update_container,
switch_container,
@ -68,7 +68,7 @@ __all__ = (
"register_loader_plugins_path",
"deregister_loader_plugin",
"load_representation",
"load_container",
"remove_container",
"update_container",
"switch_container",

View file

@ -10,7 +10,7 @@ from .utils import (
load_with_subset_context,
load_with_subset_contexts,
load_representation,
load_container,
remove_container,
update_container,
switch_container,
@ -51,7 +51,7 @@ __all__ = (
"load_with_subset_context",
"load_with_subset_contexts",
"load_representation",
"load_container",
"remove_container",
"update_container",
"switch_container",

View file

@ -333,7 +333,7 @@ def load_with_subset_contexts(
return loader.load(subset_contexts, name, namespace, options)
def load_representation(
def load_container(
Loader, representation, namespace=None, name=None, options=None, **kwargs
):
"""Use Loader to load a representation.

View file

@ -13,7 +13,7 @@ from maya import cmds
from avalon import io, api
from openpype.pipeline import (
load_representation,
load_container,
loaders_from_representation,
discover_loader_plugins,
get_representation_path,
@ -208,7 +208,7 @@ def load_look(version_id):
# Reference the look file
with lib.maintained_selection():
container_node = load_representation(loader, look_representation)
container_node = load_container(loader, look_representation)
# Get container members
shader_nodes = lib.get_container_members(container_node)