Source transition on show/hide doesn't work with scripting


New Member
I develop a small script in LUA which allows me to change the window of a source, but there is no transtion for this kind of effect. So I came to the idea to hide the source, modify the window and then show it to make it look better. Only when I hide and show the source the transtion are not trigger.

Do you have any ideas or solution ?

here is the code :

obs.obs_source_set_enabled(scene_item, false)

local window_title = get_active_window_title()
local window_class = get_active_window_class()

local data = obs.obs_source_get_settings(scene_item)
obs.obs_data_set_string(data, 'window', window_title .. ':' .. window_class .. ': ')   
obs.obs_source_update(scene_item, data)

obs.obs_source_set_enabled(scene_item, true)

where 'scene_item' is my source