1
$\begingroup$

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$
1
  • 1
    $\begingroup$ Are you looking for a solution using Animation Nodes? It seems you are asking about python but tagged AN. $\endgroup$ Commented Apr 5, 2018 at 17:11

1 Answer 1

3
$\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$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.