Merge branch 'develop' into refactor/remove_handles

This commit is contained in:
Jakub Ježek 2023-03-31 21:58:53 +02:00 committed by GitHub
commit c0d4ab010a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
166 changed files with 1235 additions and 782 deletions

View file

@ -414,7 +414,6 @@ class ExtractReview(pyblish.api.InstancePlugin):
})
# Force to pop these key if are in new repre
new_repre.pop("preview", None)
new_repre.pop("thumbnail", None)
if "clean_name" in new_repre.get("tags", []):
new_repre.pop("outputName")
@ -1700,9 +1699,9 @@ class PercentValueRelativeSource(_OverscanValue):
class OverscanCrop:
"""Helper class to read overscan string and calculate output resolution.
It is possible to enter single value for both width and heigh or two values
for width and height. Overscan string may have a few variants. Each variant
define output size for input size.
It is possible to enter single value for both width and height, or
two values for width and height. Overscan string may have a few variants.
Each variant define output size for input size.
### Example
For input size: 2200px

View file

@ -388,22 +388,27 @@ class IntegrateHeroVersion(pyblish.api.InstancePlugin):
old_repre, repre)
# Keep previously synchronized sites up-to-date
# by comparing old and new sites and adding old sites
# if missing in new ones
old_repre_files_sites = [
f.get("sites", []) for f in old_repre.get("files", [])
]
for i, file in enumerate(repre.get("files", [])):
repre_sites_names = {
s["name"] for s in file.get("sites", [])
# by comparing old and new sites and adding old sites
# if missing in new ones
# Prepare all sites from all files in old representation
old_site_names = set()
for file_info in old_repre.get("files", []):
old_site_names |= {
site["name"]
for site in file_info["sites"]
}
for site in old_repre_files_sites[i]:
if site["name"] not in repre_sites_names:
# Pop the date to tag for sync
site.pop("created_dt", None)
file["sites"].append(site)
update_data["files"][i] = file
for file_info in update_data.get("files", []):
file_info.setdefault("sites", [])
file_info_site_names = {
site["name"]
for site in file_info["sites"]
}
for site_name in old_site_names:
if site_name not in file_info_site_names:
file_info["sites"].append({
"name": site_name
})
op_session.update_entity(
project_name,