mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
fixes 🐩 and optimize renderman prefix condition
This commit is contained in:
parent
7df6c29b4e
commit
b90f54943b
2 changed files with 13 additions and 4 deletions
|
|
@ -84,7 +84,9 @@ class CreateRender(plugin.Creator):
|
|||
'mentalray': 'maya/<Scene>/<RenderLayer>/<RenderLayer>{aov_separator}<RenderPass>', # noqa
|
||||
'vray': 'maya/<scene>/<Layer>/<Layer>',
|
||||
'arnold': 'maya/<Scene>/<RenderLayer>/<RenderLayer>{aov_separator}<RenderPass>', # noqa
|
||||
'renderman': '<layer>_<aov>.<f4>.<ext>', # this needs `imageOutputDir` set separately
|
||||
# this needs `imageOutputDir`
|
||||
# (<ws>/renders/maya/<scene>) set separately
|
||||
'renderman': '<layer>_<aov>.<f4>.<ext>',
|
||||
'redshift': 'maya/<Scene>/<RenderLayer>/<RenderLayer>' # noqa
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,16 +116,23 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
|
|||
|
||||
prefix = prefix.replace(
|
||||
"{aov_separator}", instance.data.get("aovSeparator", "_"))
|
||||
|
||||
required_prefix = "maya/<scene>"
|
||||
|
||||
if renderer == "renderman":
|
||||
# renderman has prefix set differently
|
||||
required_prefix = "<ws>/renders/{}".format(required_prefix)
|
||||
|
||||
if not anim_override:
|
||||
invalid = True
|
||||
cls.log.error("Animation needs to be enabled. Use the same "
|
||||
"frame for start and end to render single frame")
|
||||
|
||||
if not prefix.lower().startswith("maya/<scene>") and \
|
||||
renderer != "renderman":
|
||||
if not prefix.lower().startswith(required_prefix):
|
||||
invalid = True
|
||||
cls.log.error("Wrong image prefix [ {} ] - "
|
||||
"doesn't start with: 'maya/<scene>'".format(prefix))
|
||||
"doesn't start with: '{}'".format(
|
||||
prefix, required_prefix))
|
||||
|
||||
if not re.search(cls.R_LAYER_TOKEN, prefix):
|
||||
invalid = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue