# Getting the actual (not default) value of a node socket that is linked to another socket

I know how to get the default_value from a node socket as described in this answer. But the answer there doesn't answer the question, namely: how to get the actual computed value of a socket.

How can I get the actual value using python?

For example, how would I determine the final Roughness value in this node structure assuming the value is constant for the material?

(I'm thinking this is not possible in general since it wouldn't work for values that change over the model, e.g., trying to obtain the Pointiness value from a Geometry node, which isn't a constant.)

• As a workaround, this answer is helpful. Feb 27 '18 at 23:06

• The shader node tree is compiled by cycles in SVM or OCL. And here the actual calculation takes place.