Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Scripts and Scene Data Bug

Please report bugs in this group. We will maybe populate a list of known bugs with a possibly modified description at a later time.

Moderator: Support

Post Reply
User avatar
gaz99
Posts: 16
Joined: 29 Nov 2016, 17:25

Scripts and Scene Data Bug

Post by gaz99 » 29 Nov 2016, 17:55

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
Gareth - Kinetic Pixel

User avatar
Karol
Posts: 640
Joined: 10 Jan 2012, 12:07

Re: Scripts and Scene Data Bug

Post by Karol » 30 Nov 2016, 16:40

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

Post Reply