Upgrading the Math Node and Vector Math Node

Upgrading the mathematical node for vectors (the name on the screenshots is “working”, the original node will be updated).
I tried to change the type / name of the output value, but got the following conclusions:

  • the socket type or name cannot be changed for an existing output parameter;
  • clearing all the output parameters array (self.outputs.clear()) in the draw_buttons() function results in the following errors (I believe these are Blender problems, tried different options to get rid of the bug):
    vector_blender_bug vector_blender_bug_2 vector_blender_bug_3

As a result, I propose the following modernization options:

  1. Socket *Shader:
    vector_out_shader
  2. Or two outputs:
    vector_out_two
  3. Well, and a variant with a separator for the output vector (for two outputs):
    vector_out_two_separator

What do you think?

Update: add number option.

1 Like