[Question]Is it possible to update list properties of a lua script in runtime?

Hi all
I'm trying to update one list property depending on the value selected in another list property. I register to the "another" property changes with obs_property_set_modified_callback, then get the "one" property with obs_properties_get and for the beginnig try to clear the list with obs_property_list_clear, but the list keeps showing old values. What am I doing wrong and is there actually a way to update list properties in script runtime?
 

olee

New Member
Did you find any solution to this problem? I have the very same issue and after changing one select value which affects the next one I always have to select another script first and then go back to the one I want to edit in order for it to update the 2nd select's list items
 
In script_properties, where you create the select lists (or other controls), call obs_property_set_modified_callback to specify a callback function. When the control changes (change the list selection, type or delete in a text field), the callback function will be called.
Return true from the callback, and the UI (all controls) will be refreshed. Return false (or omit the return statement), and no refresh.
 
Top