modified error message

This commit is contained in:
Jakub Trllo 2022-07-14 12:52:35 +02:00
parent bc09a92d52
commit b51c44d6f2

View file

@ -28,18 +28,22 @@ class ValidateFilePath(pyblish.api.InstancePlugin):
)) ))
return return
family = instance.data["family"]
label = instance.data["name"]
filepaths = instance.data["sourceFilepaths"] filepaths = instance.data["sourceFilepaths"]
if not filepaths: if not filepaths:
raise PublishValidationError( raise PublishValidationError(
( (
"Source filepaths of '{}' instance \"{}\" are not filled" "Source filepaths of '{}' instance \"{}\" are not filled"
).format(instance.data["family"], instance.data["name"]), ).format(family, label),
"File not filled", "File not filled",
( (
"## Files were not filled" "## Files were not filled"
"\nThis could mean that you didn't enter files into file" "\nThis mean that you didn't enter any files into required"
"input." " file input."
) "\n- Please refresh publishing and check instance"
" <b>{}</b>"
).format(label)
) )
not_found_files = [ not_found_files = [
@ -55,11 +59,7 @@ class ValidateFilePath(pyblish.api.InstancePlugin):
raise PublishValidationError( raise PublishValidationError(
( (
"Filepath of '{}' instance \"{}\" does not exist:\n{}" "Filepath of '{}' instance \"{}\" does not exist:\n{}"
).format( ).format(family, label, joined_paths),
instance.data["family"],
instance.data["name"],
joined_paths
),
"File not found", "File not found",
( (
"## Files were not found\nFiles\n{}" "## Files were not found\nFiles\n{}"