How to run a Python Script after a Parameter Change to set Parameter values?

   2529   1   1
User Avatar
Member
14 posts
Joined: 2月 2019
Offline
Hi Guys,

Am still fairly new to Houdini.

I have a Parameter Interface in NULL node. I want to refresh the a number of invisible Parameter values with the results of some complex calculations involving SIN, TAN etc when one of my key controlling Parameters (float) is changed in the Interface by the user updating the value directly or using a Slider.

I've tried doing my Parameter updates directly in a Python Callback script for one of the main Parameters but struggling to understand how to work the Python in one line and I don't seem to be able to use SIN, TAN etc.

Have searched and searched on Google for examples.

Is it possible to call a Script Node from a Callback or is there an altogether better way of doing it?

Many Thanks,

Shaun
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Hello Shaun,
I guess it's better when u try to do it in a proper digital asset, so that you can write your functions inside the python module of the hda, instead of trying to do oneliners.

You have to call your function stored in the python module from the callback script

check the example file

Attachments:
driving_parms.hiplc (64.0 KB)

  • Quick Links