mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
for padding is used frame_padding from anatomy templates but kept backwards compatible "frame"
This commit is contained in:
parent
0d311d63c8
commit
f30f0099fd
4 changed files with 24 additions and 6 deletions
|
|
@ -177,9 +177,16 @@ def format_anatomy(data):
|
|||
log.debug("__ anatomy.templates: {}".format(anatomy.templates))
|
||||
|
||||
try:
|
||||
padding = int(anatomy.templates['render']['padding'])
|
||||
# TODO: bck compatibility with old anatomy template
|
||||
padding = int(
|
||||
anatomy.templates["render"].get(
|
||||
"frame_padding",
|
||||
anatomy.templates["render"].get("padding")
|
||||
)
|
||||
)
|
||||
except KeyError as e:
|
||||
msg = ("`padding` key is not in `render` "
|
||||
"or `frame_padding` on is not available in "
|
||||
"Anatomy template. Please, add it there and restart "
|
||||
"the pipeline (padding: \"4\"): `{}`").format(e)
|
||||
|
||||
|
|
|
|||
|
|
@ -356,8 +356,11 @@ class IntegrateMasterVersion(pyblish.api.InstancePlugin):
|
|||
_anatomy_filled = anatomy.format(anatomy_data)
|
||||
_template_filled = _anatomy_filled["master"]["path"]
|
||||
head, tail = _template_filled.split(frame_splitter)
|
||||
padding = (
|
||||
anatomy.templates["render"]["padding"]
|
||||
padding = int(
|
||||
anatomy.templates["render"].get(
|
||||
"frame_padding",
|
||||
anatomy.templates["render"].get("padding")
|
||||
)
|
||||
)
|
||||
|
||||
dst_col = clique.Collection(
|
||||
|
|
|
|||
|
|
@ -341,8 +341,11 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
index_frame_start = None
|
||||
|
||||
if repre.get("frameStart"):
|
||||
frame_start_padding = (
|
||||
anatomy.templates["render"]["padding"]
|
||||
frame_start_padding = int(
|
||||
anatomy.templates["render"].get(
|
||||
"frame_padding",
|
||||
anatomy.templates["render"].get("padding")
|
||||
)
|
||||
)
|
||||
index_frame_start = int(repre.get("frameStart"))
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,12 @@ class CollectPlatesData(api.InstancePlugin):
|
|||
version_data = dict()
|
||||
context = instance.context
|
||||
anatomy = context.data.get("anatomy", None)
|
||||
padding = int(anatomy.templates['render']['padding'])
|
||||
padding = int(
|
||||
anatomy.templates["render"].get(
|
||||
"frame_padding",
|
||||
anatomy.templates["render"].get("padding")
|
||||
)
|
||||
)
|
||||
|
||||
name = instance.data["subset"]
|
||||
source_path = instance.data["sourcePath"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue