0
$\begingroup$

This question already has an answer here:

I have a custom node simulating a laser: enter image description here

The node itself is pretty complex with rotations and whatnot, but it's attached to a Lamp object. In short what it does is illuminate a pixel if some conditions are met (mostly boolean checking with some algebra). It's based on this. I have to create a demo to show the laser properties and how it can be tunned and changed. I would like to change the input values of this node (elevation,azimuth, turning around the laser beam axis and laser width/girth) from a python script.

How can I select and change the input values for this node and how can I set them depending on the frame number?

$\endgroup$

marked as duplicate by Jaroslav Jerryno Novotny, Ray Mairlot, Omar Emara, David Apr 6 '18 at 20:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Are you looking for a solution using Animation Nodes? It seems you are asking about python but tagged AN. $\endgroup$ – Omar Emara Apr 5 '18 at 17:11
0
$\begingroup$

The group node in the material has input sockets and you can set the default_value of each socket. The default_value is used when there is no link to the socket to get a value from another node.

mat = bpy.data.materials['Material']
gr_node = mat.node_tree.nodes['Group']

gr_node.inputs['Elevation'].default_value = 15.3
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.