diff --git a/client/version_control/plugins/create/unreal/changelist_metadata.py b/client/version_control/plugins/create/unreal/changelist_metadata.py index 79a8bc3..3be9440 100644 --- a/client/version_control/plugins/create/unreal/changelist_metadata.py +++ b/client/version_control/plugins/create/unreal/changelist_metadata.py @@ -4,6 +4,7 @@ from ayon_unreal.api.plugin import UnrealBaseAutoCreator from ayon_unreal.api.pipeline import create_publish_instance, imprint + class UnrealPublishCommit(UnrealBaseAutoCreator): """Auto creator to mark current version of project as published. @@ -17,7 +18,7 @@ class UnrealPublishCommit(UnrealBaseAutoCreator): product_type = "changelist_metadata" label = "Publish Changelist Metadata" - default_variant = "" + default_variant = "Main" def create(self, options=None): existing_instance = None @@ -33,7 +34,6 @@ def create(self, options=None): task_entity = context.get_current_task_entity() task_name = task_entity["name"] host_name = context.host_name - if existing_instance is None: product_name = self.get_product_name( @@ -43,10 +43,11 @@ def create(self, options=None): data = { "folderPath": folder_path, - "task_name": task_name, + "task": task_name, "variant": self.default_variant, "productName": product_name } + data.update(self.get_dynamic_data( project_name, folder_entity, @@ -76,14 +77,12 @@ def create(self, options=None): elif ( existing_instance["folderPath"] != folder_path - # 'task' just for backward compatibility - or (existing_instance.get("task") or - existing_instance["task_name"]) != task_name + or existing_instance.get("task") != task_name ): product_name = self.get_product_name( project_name, folder_entity, task_entity, self.default_variant, host_name ) existing_instance["folderPath"] = folder_path - existing_instance["task_name"] = task_name + existing_instance["task"] = task_name existing_instance["productName"] = product_name