5
$\begingroup$

How do I set a callback for socket input change (value or link change) when having a custom node? I have a socket defined like:

self.node_tree.inputs.new("NodeSocketFloat", "Start")

Is there a way to call an update function such as when working with a Property, for example:

bpy.props.FloatProperty(name="Value", description="Trololo..",default=0.0, update=update_effect)

Now it seems like the whole compositor gets refreshed when changing the socket value but I need to actually compute something not related to the linked group nodes to the changed socket just like when the property gets changed and calls the update_effect. Thanks.

EDIT: I have tried defining socket_value_update function which doesn't seem to work at all. update function does what I need but only when a link to the socket is removed/added, not when the value changes.

EDIT2: I've opened this issue here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.