mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Added new style validation for check for editorial resources
This commit is contained in:
parent
edd0fb1ce9
commit
ef695cb153
2 changed files with 22 additions and 2 deletions
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root>
|
||||
<error id="main">
|
||||
<title>Missing source video file</title>
|
||||
<description>
|
||||
## No attached video file found
|
||||
|
||||
Process expects presence of source video file with same name prefix as an editorial file in same folder.
|
||||
(example `simple_editorial_setup_Layer1.edl` expects `simple_editorial_setup.mp4` in same folder)
|
||||
|
||||
|
||||
### How to repair?
|
||||
|
||||
Copy source video file to the folder next to `.edl` file. (On a disk, do not put it into Standalone Publisher.)
|
||||
</description>
|
||||
</error>
|
||||
</root>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import pyblish.api
|
||||
import openpype.api
|
||||
from openpype.pipeline import PublishXmlValidationError
|
||||
|
||||
|
||||
class ValidateEditorialResources(pyblish.api.InstancePlugin):
|
||||
|
|
@ -19,5 +20,7 @@ class ValidateEditorialResources(pyblish.api.InstancePlugin):
|
|||
f"Instance: {instance}, Families: "
|
||||
f"{[instance.data['family']] + instance.data['families']}")
|
||||
check_file = instance.data["editorialSourcePath"]
|
||||
msg = f"Missing \"{check_file}\"."
|
||||
assert check_file, msg
|
||||
msg = f"Missing source video file."
|
||||
|
||||
if not check_file:
|
||||
raise PublishXmlValidationError(self, msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue