-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean expression does not seem to work (+ui is misleading) #260
Comments
expressions are a bit sensitive. in this case, it will only update if the actual referenced parameter in the expression changes. for this kind of link you should use control mode reference, far easier and more stable |
Yeah, but i wanted to negate it simply, and thats not possible with refs. |
Okay spent some more days messing around, and actually got most of what i wanted and even more working:) But i figured there is something weird going on: script.log(root.modules.obsWebsocket.values.sceneItemVisibility.scene_item_20.get()); // 0
script.log(typeof root.modules.obsWebsocket.values.sceneItemVisibility.scene_item_20.get()); // number
script.log(root.modules.obsWebsocket.values.sceneItemVisibility.scene_item_20.get()==="0"?"TRUE":"FALSE"); // FALSE
script.log(root.modules.obsWebsocket.values.sceneItemVisibility.scene_item_20.get()===0?"TRUE":"FALSE"); // FALSE
script.log(root.modules.obsWebsocket.values.sceneItemVisibility.scene_item_20.get()==0?"TRUE":"FALSE"); // TRUE
script.log(root.modules.obsWebsocket.values.sceneItemVisibility.scene_item_20.get()==1?"TRUE":"FALSE"); // FALSE And that field is a boolean parameter, created as this: c.addBoolParameter(itemName, "", isPresent);
c.getChild(itemName).setAttribute("readonly", true); So apparently it is a number, but it's not really ===0 root.modules.obsWebsocket.values.sceneItemVisibility.scene_item_20.get()==0 does not work as an expression either, it stays one value. So something fishy is going around, but other values, e.g. bool custom variable works in expressions nicely. |
The current javascript engine is custom vanilla JS from JUCE. |
Environment
Describe the bug
I was trying to make a template for toggling a scene item visibility in OBS.
I already have a value that is updated when OBS repots any change about it.
Now I set the template parameter to be an expression (for test just to send the current value), and that does not seem to work.
Also when it is in expression mode the checkbox is still visible, that is not really clear. It seems it still sends the value of the checkbox not the expression.
I have made a video about it:
vokoscreenNG-2024-12-04_16-56-33.mp4
The text was updated successfully, but these errors were encountered: