tvpaint load plugins are expecting representation context

This commit is contained in:
Jakub Trllo 2024-02-26 17:53:00 +01:00
parent 54a71203ef
commit 6d71830e32

View file

@ -210,15 +210,17 @@ class LoadImage(plugin.Loader):
def switch(self, container, representation):
self.update(container, representation)
def update(self, container, representation):
def update(self, container, context):
"""Replace container with different version.
New layers are loaded as first step. Then is tried to change data in
new layers with data from old layers. When that is done old layers are
removed.
"""
repre_doc = context["representation"]
# Create new containers first
context = get_representation_context(representation)
context = get_representation_context(repre_doc)
# Get layer ids from previous container
old_layer_names = self.get_members_from_container(container)