godot icon indicating copy to clipboard operation
godot copied to clipboard

Improve Visual Shader

Open k0T0z opened this issue 1 year ago • 2 comments

As requested by @Mickeon in #93791, I went ahead and separated some code improvements away from some comments improvements.

k0T0z avatar Jul 06 '24 04:07 k0T0z

Some of these don't look like error cases, but early returns to optimize the code. These should not use the error macros, as they log to console whenever they happen. Ome such example seems to be checking if the class is the same in replace_node. Or can_connect_nodes checking for the same node.

Also if a condition is not clearly readable, ideally use the _MSG variant to explain the condition so that users aren't confused about why it errors.

RedMser avatar Jul 06 '24 07:07 RedMser

Make sense. Some of these conditions aren't actually failures you mean. Thank you for the clarification. I consider my Visual Shader PRs as a playground for now until they become valuable.

k0T0z avatar Jul 06 '24 08:07 k0T0z