Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Editorial does not use asset naming #592

Merged
merged 8 commits into from
Jun 10, 2024
25 changes: 18 additions & 7 deletions client/ayon_core/plugins/publish/collect_anatomy_instance_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,11 @@ def _fill_folder_data(self, instance, project_entity, anatomy_data):
anatomy_data.update(folder_data)
return

if instance.data.get("newAssetPublishing"):
if (
instance.data.get("newHierarchyIntegration")
# Backwards compatible
or instance.data.get("newAssetPublishing")
):
hierarchy = instance.data["hierarchy"]
anatomy_data["hierarchy"] = hierarchy

Expand All @@ -409,7 +413,7 @@ def _fill_folder_data(self, instance, project_entity, anatomy_data):
"path": instance.data["folderPath"],
# TODO get folder type from hierarchy
# Using 'Shot' is current default behavior of editorial
# (or 'newAssetPublishing') publishing.
# (or 'newHierarchyIntegration') publishing.
"type": "Shot",
},
})
Expand All @@ -432,15 +436,22 @@ def _fill_task_data(self, instance, task_types_by_name, anatomy_data):
if task_data:
# Fill task data
# - if we're in editorial, make sure the task type is filled
if (
not instance.data.get("newAssetPublishing")
or task_data["type"]
):
new_hierarchy = (
instance.data.get("newHierarchyIntegration")
# Backwards compatible
or instance.data.get("newAssetPublishing")
)
if not new_hierarchy or task_data["type"]:
anatomy_data["task"] = task_data
return

# New hierarchy is not created, so we can only skip rest of the logic
if not instance.data.get("newAssetPublishing"):
new_hierarchy = (
instance.data.get("newHierarchyIntegration")
# Backwards compatible
or instance.data.get("newAssetPublishing")
)
if not new_hierarchy:
return

# Try to find task data based on hierarchy context and folder path
Expand Down
6 changes: 5 additions & 1 deletion client/ayon_core/plugins/publish/validate_asset_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ def process(self, instance):
if instance.data.get("folderEntity"):
self.log.debug("Instance has set fodler entity in its data.")

elif instance.data.get("newAssetPublishing"):
elif (
instance.data.get("newHierarchyIntegration")
# Backwards compatible
or instance.data.get("newAssetPublishing")
):
# skip if it is editorial
self.log.debug("Editorial instance has no need to check...")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def process(self, context):
task["name"]: {"type": task["type"]}
for task in self.add_tasks},
"representations": [],
"newAssetPublishing": True
"newHierarchyIntegration": True,
# Backwards compatible
"newAssetPublishing": True,
})
self.log.debug("__ inst_data: {}".format(pformat(inst_data)))

Expand Down
2 changes: 1 addition & 1 deletion server_addon/flame/client/ayon_flame/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'flame' version."""
__version__ = "0.2.0"
__version__ = "0.2.1"
2 changes: 1 addition & 1 deletion server_addon/flame/package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "flame"
title = "Flame"
version = "0.2.0"
version = "0.2.1"

client_dir = "ayon_flame"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def process(self, context):

# add all additional tags
"tags": phiero.get_track_item_tags(track_item),
"newAssetPublishing": True
"newHierarchyIntegration": True,
# Backwards compatible
"newAssetPublishing": True,
})

# otio clip data
Expand Down
2 changes: 1 addition & 1 deletion server_addon/hiero/client/ayon_hiero/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'hiero' version."""
__version__ = "0.2.0"
__version__ = "0.2.1"
2 changes: 1 addition & 1 deletion server_addon/hiero/package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "hiero"
title = "Hiero"
version = "0.2.0"
version = "0.2.1"
client_dir = "ayon_hiero"

ayon_required_addons = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def process(self, context):
"fps": context.data["fps"],
"handleStart": handle_start,
"handleEnd": handle_end,
"newHierarchyIntegration": True,
# Backwards compatible
"newAssetPublishing": True,
"families": ["clip"],
"productType": product_type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ def _get_base_instance_data(
"shotName": shot_name,
"variant": variant_name,
"task": None,
"newHierarchyIntegration": True,
# Backwards compatible
"newAssetPublishing": True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we now start removing this older data key to ensure the new one does what we want it to do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can have new traypublisher addon and old ayon-core addon...

Copy link
Collaborator

@BigRoy BigRoy Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a remove backwards compatibility by version x.y.z label to the comment so we know when to remove it in the future? Or do we prepare an issue now to remind us in say 3 months?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you not make use of the package ayon_required_addons to force a minimum version?

Copy link
Member Author

@iLLiCiTiT iLLiCiTiT Jun 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a remove backwards compatibility by version x.y.z label to the comment so we know when to remove it in the future? Or do we prepare an issue now to remind us in say 3 months?

At this moment specific version is too "wild" guess. But I guess we can add at least date when it "started" to be deprecated?

can you not make use of the package ayon_required_addons to force a minimum version?

You can, but core cannot (or should not). And at this moment we don't know about all unofficial addons using this.

"trackStartFrame": track_start_frame,
"timelineOffset": timeline_offset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ def process(self, instance):
return

# editorial would fail since they might not be in database yet
new_folder_publishing = instance.data.get("newAssetPublishing")
if new_folder_publishing:
new_hierarchy = (
instance.data.get("newHierarchyIntegration")
# Backwards compatible
or instance.data.get("newAssetPublishing")
)
if new_hierarchy:
self.log.debug("Instance is creating new folders. Skipping.")
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ def process(self, instance):
return

# editorial would fail since they might not be in database yet
new_folder_publishing = instance.data.get("newAssetPublishing")
if new_folder_publishing:
new_hierarchy = (
instance.data.get("newHierarchyIntegration")
# Backwards compatible
or instance.data.get("newAssetPublishing")
)
if new_hierarchy:
self.log.debug("Instance is creating new folder. Skipping.")
return

Expand Down
2 changes: 1 addition & 1 deletion server_addon/traypublisher/package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "traypublisher"
title = "TrayPublisher"
version = "0.2.1"
version = "0.2.2"

client_dir = "ayon_traypublisher"

Expand Down
Loading