Pass context along with RepairContextAction and refactor its usage

This commit is contained in:
Roy Nieterau 2018-10-22 14:22:42 +02:00
parent 2e3dbaf047
commit ef46fa1bcb
3 changed files with 4 additions and 4 deletions

View file

@ -87,6 +87,6 @@ class RepairContextAction(pyblish.api.Action):
# Apply pyblish.logic to get the instances for the plug-in
if plugin in errored_plugins:
self.log.info("Attempting fix ...")
plugin.repair()
plugin.repair(context)

View file

@ -36,7 +36,7 @@ class ValidateMayaUnits(pyblish.api.ContextPlugin):
assert fps and fps == asset_fps, "Scene must be %s FPS" % asset_fps
@classmethod
def repair(cls):
def repair(cls, context):
"""Fix the current FPS setting of the scene, set to PAL(25.0 fps)"""
cls.log.info("Setting angular unit to 'degrees'")

View file

@ -53,8 +53,8 @@ class ValidateVRayTranslatorEnabled(pyblish.api.ContextPlugin):
return invalid
@staticmethod
def repair():
@classmethod
def repair(cls, context):
vray_settings = cmds.ls(type="VRaySettingsNode")
if not vray_settings: