Nuke: proxy mode validator refactory to new publisher

This commit is contained in:
Jakub Jezek 2022-05-27 13:07:39 +02:00
parent 01ba3d1c8a
commit b9e16e87f9
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
2 changed files with 22 additions and 2 deletions

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<error id="main">
<title>Proxy mode</title>
<description>
## Invalid proxy mode value
Nuke is set to use Proxy. This is not supported by publisher.
### How to repair?
1. Use Repair button.
2. Hit Reload button on the publisher.
</description>
</error>
</root>

View file

@ -1,5 +1,6 @@
import pyblish
import nuke
from openpype.pipeline import PublishXmlValidationError
class FixProxyMode(pyblish.api.Action):
@ -7,7 +8,7 @@ class FixProxyMode(pyblish.api.Action):
Togger off proxy switch OFF
"""
label = "Proxy toggle to OFF"
label = "Repair"
icon = "wrench"
on = "failed"
@ -30,4 +31,7 @@ class ValidateProxyMode(pyblish.api.ContextPlugin):
rootNode = nuke.root()
isProxy = rootNode["proxy"].value()
assert not isProxy, "Proxy mode should be toggled OFF"
if not isProxy:
raise PublishXmlValidationError(
self, "Proxy mode should be toggled OFF"
)