OBS Lua - Scene Item to Source

Alexik

New Member
I need to get a list of sources of needed scene, but i only found the way to get a list of obs_scene_item objects. How to take the obs_source objects from them?
 

Attachments

  • 2020-06-26 12-01-24.txt
    51.9 KB · Views: 125

mball2301

New Member
I have not gotten my script to work yet (frontend call issue). But I would think the function:
obs_sceneitem_get_source(scene_item) would get you there.

This would be in a for loop to iterate the scene items (i.e for _, scene_item in ipairs(scene_items) do)
 

Alexik

New Member
I have not gotten my script to work yet (frontend call issue). But I would think the function:
obs_sceneitem_get_source(scene_item) would get you there.

This would be in a for loop to iterate the scene items (i.e for _, scene_item in ipairs(scene_items) do)
Yesterday it took about 4 hours for me to look for this method and i didn't find it. I was sure i fully researched the https://obsproject.com/docs/reference-scenes.html page but now i see this method is there right under obs_sceneitem_get_scene which i saw. Thanks a lot.
 

mball2301

New Member
Thanks for your help. With your help I was able to get my script going. I still have somewhere that I am not releasing objects so I show memory leaks. Do you know the best way to correct this?
 

Attachments

  • 2020-06-30 17-28-46.txt
    17.8 KB · Views: 108
Top