custom handling of 'user' data used for template

This commit is contained in:
Jakub Trllo 2025-10-22 14:32:12 +02:00
parent 2e2d67c243
commit d700f9f09b

View file

@ -121,7 +121,6 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
"version", "version",
"representation", "representation",
"username", "username",
"user",
"output", "output",
# OpenPype keys - should be removed # OpenPype keys - should be removed
"asset", # folder[name] "asset", # folder[name]
@ -796,6 +795,14 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
if value is not None: if value is not None:
repre_context[key] = value repre_context[key] = value
# Keep only username
# NOTE This is to avoid storing all user attributes and data
# to representation
if "user" not in repre_context:
repre_context["user"] = {
"name": template_data["user"]["name"]
}
# Use previous representation's id if there is a name match # Use previous representation's id if there is a name match
existing = existing_repres_by_name.get(repre["name"].lower()) existing = existing_repres_by_name.get(repre["name"].lower())
repre_id = None repre_id = None