Resource icon

OBS Lua Visibility Timer 1.0

Alexandremix

New Member
if this used the function obs.obs_sceneitem_set_visible(sceneitem, false)
It would be the perfect script, I dont know how to program this. I just searched a little through the code.

this is using obs.obs_source_set_enabled(source, true) instead of items.

the function
obs.obs_sceneitem_set_visible(sceneitem, false)
removes the eye in the obs studio. is it possible to make a revision on this?
 

Wayne01

Member
Hello
I'm using this script to hide and show source after a specific time, but there are no effects applied to the source when showing/hiding it (OBS standard effects on show and hide, e.g. "cut" or "fade" effect)
Any ideas how to add them?
Thx
 

Wayne01

Member
if this used the function obs.obs_sceneitem_set_visible(sceneitem, false)
It would be the perfect script, I dont know how to program this. I just searched a little through the code.

this is using obs.obs_source_set_enabled(source, true) instead of items.

the function
obs.obs_sceneitem_set_visible(sceneitem, false)
removes the eye in the obs studio. is it possible to make a revision on this?

His suggestion is correct.
If the script can hide and show source by unckecking an eye icon this would give us chance to use OBS in and out transition effects
 

dqm

Member
I've setup a source to disappear after 5 seconds. It works sorta, but not quite like I expected. As written, it does not work when the scene transitions from preview to program (presumably because the source is already active in preview). Nor does it work if the same source is already active in preview or program as part of different scene.

I know I can work-around the latter issue by using distinct sources in every scene, each with it's own visibility timer. But, whew...not sure it's worth the grind. And that doesn't solve the preview-to-program issue.

What I want is to engage the (in)visibility timer anytime a scene containing its designated source is moved to preview or program. So, the timer will engage when the scene goes to preview, transitions to program, or goes directly to program. And it will do so regardless of whether the source is already active in either preview or program.

Is that possible?
 

dqm

Member
No longer works for me...AT ALL. Cannot repeat partial success I had last year. Have upgraded OBS in the meantime...maybe that's the culprit.
 

Dick Dawson

Member
For anyone having issues this might help. I'm running Mac OS 13 Ventura and OBS 29.1.3. For me, it only works on a source in the active scene. NOT in a source in a nested scene in the active scene. I'm not sure if this is OBS 29, Mac OS or the version of Python I have (3.11). So I had a nested scene for "Bottom Scrolls" but I only have a few I use so they are now solo in the "Main Set" in OBS but it works perfectly.
 

shimatai

New Member
Is there any way to trigger this script using a hotkey?

For example, I want to trigger the visibility timer when I press keyboard keys Ctrl + 8, then the script would run. Is this possible?
 

REDDDDY

New Member
is possible to have it show at a certain time and hide at a certain time.
my obs pc is always ON 24/7 and it is projecting on a screen 24/7.
i want to show and hide a certain source at a specific time.

can you help?
 
Top