mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'develop' into enhancement/OP-6154_Publishing-Luts
This commit is contained in:
commit
72ca25a9a9
29 changed files with 759 additions and 173 deletions
|
|
@ -7,12 +7,12 @@ from openpype.pipeline.publish import (
|
|||
|
||||
|
||||
class ValidatePublishDir(pyblish.api.InstancePlugin):
|
||||
"""Validates if 'publishDir' is a project directory
|
||||
"""Validates if files are being published into a project directory
|
||||
|
||||
'publishDir' is collected based on publish templates. In specific cases
|
||||
('source' template) source folder of items is used as a 'publishDir', this
|
||||
validates if it is inside any project dir for the project.
|
||||
(eg. files are not published from local folder, unaccessible for studio'
|
||||
In specific cases ('source' template - in place publishing) source folder
|
||||
of published items is used as a regular `publish` dir.
|
||||
This validates if it is inside any project dir for the project.
|
||||
(eg. files are not published from local folder, inaccessible for studio')
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -44,6 +44,8 @@ class ValidatePublishDir(pyblish.api.InstancePlugin):
|
|||
|
||||
anatomy = instance.context.data["anatomy"]
|
||||
|
||||
# original_dirname must be convertable to rootless path
|
||||
# in other case it is path inside of root folder for the project
|
||||
success, _ = anatomy.find_root_template_from_path(original_dirname)
|
||||
|
||||
formatting_data = {
|
||||
|
|
@ -56,11 +58,12 @@ class ValidatePublishDir(pyblish.api.InstancePlugin):
|
|||
formatting_data=formatting_data)
|
||||
|
||||
def _get_template_name_from_instance(self, instance):
|
||||
"""Find template which will be used during integration."""
|
||||
project_name = instance.context.data["projectName"]
|
||||
host_name = instance.context.data["hostName"]
|
||||
anatomy_data = instance.data["anatomyData"]
|
||||
family = anatomy_data["family"]
|
||||
family = self.family_mapping.get("family") or family
|
||||
family = self.family_mapping.get(family) or family
|
||||
task_info = anatomy_data.get("task") or {}
|
||||
|
||||
return get_publish_template_name(
|
||||
|
|
|
|||
|
|
@ -25,16 +25,16 @@ class ValidateVersion(pyblish.api.InstancePlugin):
|
|||
# TODO: Remove full non-html version upon drop of old publisher
|
||||
msg = (
|
||||
"Version '{0}' from instance '{1}' that you are "
|
||||
" trying to publish is lower or equal to an existing version "
|
||||
" in the database. Version in database: '{2}'."
|
||||
"trying to publish is lower or equal to an existing version "
|
||||
"in the database. Version in database: '{2}'."
|
||||
"Please version up your workfile to a higher version number "
|
||||
"than: '{2}'."
|
||||
).format(version, instance.data["name"], latest_version)
|
||||
|
||||
msg_html = (
|
||||
"Version <b>{0}</b> from instance <b>{1}</b> that you are "
|
||||
" trying to publish is lower or equal to an existing version "
|
||||
" in the database. Version in database: <b>{2}</b>.<br><br>"
|
||||
"trying to publish is lower or equal to an existing version "
|
||||
"in the database. Version in database: <b>{2}</b>.<br><br>"
|
||||
"Please version up your workfile to a higher version number "
|
||||
"than: <b>{2}</b>."
|
||||
).format(version, instance.data["name"], latest_version)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue