Get output value from Material Node via JS

Get output value from Material Node via JS

I'm trying to get the value of the first number node of the attached material (node editor screencap) using the below JS.
Code:
function main(doc){
	var mat2Get = doc.materialAtIndex(0);
	var numNode = mat2Get.nodeAtIndex(1);
	var numOut = numNode.outputAtIndex(0);

	print(""+numNode.nodeType()+" * "+numNode.outputCount()+" * "+numOut);

}
The output of this yields:

number * 1 * [object CallbackObject]

Can someone help me understand the "[object CallbackObject]" returned and how to get the actual value of the node's output?

TIA
Jeff
 

Attachments

  • MatNodeView.jpg
    MatNodeView.jpg
    94.3 KB · Views: 449
Last edited:
Back
Top