mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
nuke validate knobs with help
This commit is contained in:
parent
44bd543d13
commit
e2b2bdc15d
3 changed files with 22 additions and 4 deletions
16
openpype/hosts/nuke/plugins/publish/help/validate_knobs.xml
Normal file
16
openpype/hosts/nuke/plugins/publish/help/validate_knobs.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root>
|
||||
<error id="main">
|
||||
<title>Knobs value</title>
|
||||
<description>
|
||||
## Invalid node's knobs values
|
||||
|
||||
Following node knobs needs to be repaired:
|
||||
|
||||
### How to repair?
|
||||
|
||||
1. Use Repair button.
|
||||
2. Hit Reload button on the publisher.
|
||||
</description>
|
||||
</error>
|
||||
</root>
|
||||
|
|
@ -2,6 +2,7 @@ import nuke
|
|||
|
||||
import pyblish.api
|
||||
import openpype.api
|
||||
from openpype.pipeline import PublishXmlValidationError
|
||||
|
||||
|
||||
class ValidateKnobs(pyblish.api.ContextPlugin):
|
||||
|
|
@ -27,11 +28,12 @@ class ValidateKnobs(pyblish.api.ContextPlugin):
|
|||
optional = True
|
||||
|
||||
def process(self, context):
|
||||
|
||||
invalid = self.get_invalid(context, compute=True)
|
||||
if invalid:
|
||||
raise RuntimeError(
|
||||
"Found knobs with invalid values:\n{}".format(invalid)
|
||||
raise PublishXmlValidationError(
|
||||
self,
|
||||
"Found knobs with invalid values:\n{}".format(invalid),
|
||||
formatting_data={}
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -76,5 +76,5 @@ class ValidateNukeWriteNode(pyblish.api.InstancePlugin):
|
|||
xml_msg += _msg_add
|
||||
|
||||
raise PublishXmlValidationError(
|
||||
self, dbg_msg, {"xml_msg": xml_msg}
|
||||
self, dbg_msg, formatting_data={"xml_msg": xml_msg}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue