
Search is based on keyword.
Ex: "Procedures"
Do not search with natural language
Ex: "How do I write a new procedure?"
Q100496: Adding a red error glow around a node via Python scripting
Warning: This article contains links to external websites
SUMMARY
When creating custom node types, for example SuperTools or NodeTypeBuilder-based node types, users may wish to add a red error glow around the node to indicate if there is an issue that might be preventing the node from working correctly (for example a missing input connection or plug-in that hasn’t been found).
This article demonstrates the API functions used to add this error glow to a node.
MORE INFORMATION
The red glow that typically indicates errors with particular nodes in Katana's Node Graph tab can be controlled using the UI4.Util.NodeErrors Python module.
Given a particular node:
node = NodegraphAPI.GetNode('GafferThree')
To apply the red glow:
UI4.Util.NodeErrors.SetNodeError(node, 'Something is wrong.')
The second parameter is an error message that can be viewed by pressing the T key (for Tooltip) while pointing at the node in the Node Graph tab:
To remove the red glow:
UI4.Util.NodeErrors.ClearNodeError(node)
This could be used in custom node types like SuperTools to indicate to users that something went wrong with a particular node, for example after performing some operation when clicking a button in the SuperTool's parameter interface.
FURTHER READING
More info about creating custom node types:
Developing Custom Nodes in the Katana Online Help
Customizing Node Types in the Katana Developer Guide
More info about customising the look of nodes in the Node Graph tab using Python:
Node Properties in the Katana Developer Guide
Q100108: Add custom menu items to the context menu of nodes
Q100277: Positioning nodes in the Katana Node Graph via Python
If you are encountering any issues with the information above, then please open a Support ticket and let us know the issue you are encountering and the troubleshooting steps you have taken so far.
For more information on how to open a Support ticket, please refer to Q100064: How to raise a support ticket.
Sorry you didn't find this helpful
Why wasn't this helpful? (check all that apply)
Thanks for your feedback.
If you can't find what you're looking for or you have a workflow question, please try Foundry Support.
If you have any thoughts on how we can improve our learning content, please email the Documentation team using the button below.
Thanks for taking time to give us feedback.