Displaying an error message from a geometry node

Here’s what I’ve been working on:

Imgur

This node parses an expression and dynamically adds the appropriate sockets. This happens in the declare callback and I can’t see any way to show an error message if the parsing fails. I see how to display an error in the geometry_node_execute callback, but not in the declare callback.

2 Likes

You shouldn’t do that. This not designed for errors and parsing at all. At least, you can display error in runtime…

I guess I can add another string input where you list the variable names and parse it in a way that can’t fail, and a dropdown box where you select the output type. Then look at the expression in the exec callback and show any errors.

Yup, that works.

1 Like