Page 1 of 1

Scripts and Scene Data Bug

Posted: 29 Nov 2016, 17:55
by gaz99
Hi,

I have attached a project which has two scenes a MainScene and a ScriptInSeperateScene. In the MainScene I have two scene data items, a float called 'timer' and a string called 'myString'. Then I have a script that takes an integer and a string which is the scene data string 'myString'. I then have an event that when fired it toggles a toggle which is linked to the integer of the script which will run the script (or if 'myString' value is changed). The script is empty and just outputs a debug log when it's run. This works fine when the event is fired, however if i modify the float in the scene data (which is not connected to the script at all) it causes the script to be run which seems like a bug to me and is causing performance issues.

Now in this scene I also have a scene port which loads in the ScriptInSeperateScene which is essentially a copy of the MainScene with all needed attributes exposed to scene layer so I can pass down from the MainScene (scene data and invokes). When changing the float in the scene data from the MainScene, the script in the MainScene is being run multiple times (as mentioned above) but the exact same script through a scene port acts as expected and only runs when the event is fired.


Project Link: https://we.tl/KkTKpGwkVQ(Expires 6th Dec 2016)

Can this be fixed ?

Cheers

Gaz

Re: Scripts and Scene Data Bug

Posted: 30 Nov 2016, 16:40
by Karol
Hi Gaz!

I understand your problem! But this cannot be fixed as it is based on some fundamental Ventuz concepts which cannot be changed easily.
Changing a single SceneData item invalidates all nodes which have binding to SceneData - even if the bound item did not change.
And our nodes do not check if their inputs really have changed as the nodes only invalidate their outputs (signal that the output property has changed) if the new output value is really different.
So you have the protect the performance-critical input properties: bind e.g. a ValueBuffer in 'Bypass' mode; it will check if the 'new' input is really new and break the invalidation if it's still the same value.

Best Regards
Karol