baldingwizard / Blender-Addons

119 stars 20 forks source link

Maths Expression : Texture Dimensions breaks linking of texture nodes #12

Closed baldingwizard closed 4 years ago

baldingwizard commented 4 years ago

At Blender version 2.83 the various texture nodes have a 'Dimension' input for 1D, 2D, 3D, 4D. This results in a new 'W' input which is sometimes hidden and sometimes used. The presence of the additional input means that the Scale input from an expression is being applied to the wrong input and the other arguments are being shifted one socket out of place. Need to amend the linking of nodes to handle the additional input socket.

baldingwizard commented 4 years ago

Amended logic to assign the values to the sockets to skip the 'W' input if found to be present. This resolves the problems and is compatible with earlier releases of Blender that do not have the socket - since it is only skipped if found to be named 'W'.