mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
Cleanup, simplify, fix typos
This commit is contained in:
parent
806c37c742
commit
01ec54651d
1 changed files with 8 additions and 9 deletions
|
|
@ -6,10 +6,10 @@ import pyblish.api
|
|||
class ValidateFilenameHasExtension(pyblish.api.InstancePlugin):
|
||||
"""Ensure the Saver has an extension in the filename path
|
||||
|
||||
This is to counter any possible file being written as `filename` instead
|
||||
of `filename.frame.ext`.
|
||||
Fusion does not set an extension for your filename
|
||||
when changing the file format of the saver.
|
||||
This disallows files written as `filename` instead of `filename.frame.ext`.
|
||||
Fusion does not always set an extension for your filename when
|
||||
changing the file format of the saver.
|
||||
|
||||
"""
|
||||
|
||||
order = pyblish.api.ValidatorOrder
|
||||
|
|
@ -20,7 +20,7 @@ class ValidateFilenameHasExtension(pyblish.api.InstancePlugin):
|
|||
def process(self, instance):
|
||||
invalid = self.get_invalid(instance)
|
||||
if invalid:
|
||||
raise RuntimeError("Found Saver(s) without a extesions")
|
||||
raise RuntimeError("Found Saver without an extension")
|
||||
|
||||
@classmethod
|
||||
def get_invalid(cls, instance):
|
||||
|
|
@ -29,9 +29,8 @@ class ValidateFilenameHasExtension(pyblish.api.InstancePlugin):
|
|||
fname, ext = os.path.splitext(path)
|
||||
|
||||
if not ext:
|
||||
cls.log.error("%s has no extension specified" %
|
||||
instance[0].Name)
|
||||
# Return the tool
|
||||
return [instance[0]]
|
||||
tool = instance[0]
|
||||
cls.log.error("%s has no extension specified" % tool.Name)
|
||||
return [tool]
|
||||
|
||||
return []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue