Input of script not updating properly when it is changed

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
Luke47921
Posts: 32
Joined: 21 Oct 2015, 13:23

Input of script not updating properly when it is changed

Post by Luke47921 » 12 Jan 2016, 11:32

I have a scene port in my scene, which is building an image using a script, which is constantly updating in the validate function. It looks something like this:

Image

As you can see, the index is linked to another node (A multi switch in this case) which is changed via the main scene. When the index changes, my scene port should generate a new image based on the given index. My problem is that when the index is changed, the script in my scene port doesn't register the change, unless i double click on the index value (as if I'm going to change it) and hit enter, in which case it updates as it should.

How can I fix this? Could this be a problem with my script, with the scene port, or my Ventuz settings?

User avatar
Götz_B
Posts: 180
Joined: 21 May 2013, 13:01

Re: Input of script not updating properly when it is changed

Post by Götz_B » 18 Feb 2016, 14:06

Hi,

I tried to reproduce the behaviour you describe. I build a simple scene with a script that takes and index and shows it on screen. Then I exposed the input property of the script node directly, loaded it in a scene port and bound the index to a multiswitch.... and it works fine.

Is there something you did different? If you like you can send me the scene and i'll can have a quick look what the problem might be.

Regards,
Götz

Luke47921
Posts: 32
Joined: 21 Oct 2015, 13:23

Re: Input of script not updating properly when it is changed

Post by Luke47921 » 22 Feb 2016, 17:17

Hi Götz,

This was a while ago, and I can't exactly remember what the problem was, but I think It turned out to be just a problem with me not setting the changed variable in the right places in my script, so the values weren't updating properly.

Thanks for your help anyway :)

Post Reply