BlankSourceCode / obs-zoom-to-mouse

An OBS lua script to zoom a display-capture source to focus on the mouse
178 stars 15 forks source link

Cannot use a source inside of a folder? #27

Closed hemkesa closed 4 months ago

hemkesa commented 5 months ago

It seems to be an issue with detecting the source most likely? It appears in the dropdown for the sources correctly, however when toggling the zoom, it doesnt do anything, despite saying its zooming in the log.

I suspect it has something to do with the fact that its in a folder because if I use a fresh display capture outside of the folder, it has no problem. When I move it into the folder, still no problem. If I switch scenes however, and then come back to the scene with the source in the folder it doesnt work anymore. This doesnt occur whenever I switch scenes and my source is outside the folder.

I understand that theres some limitations to detecting sources inside folders with obs raw, could this extend to this script too? (I have 0 knowledge on lua, but wanted to throw it out there)

Thank you for the wonderful plug-in! Super smooth (;

(Using OBS 29.0.2, 64-bit)

hemkesa commented 5 months ago

For now my solution to this is having the source inside of a different scene, add the scene as a source to the scene where i wanna use that display capture, put it in the folder (which is there to be a sort of glue holding together various elements for a stream overlay), and then add the same scene as a source AGAIN but leave it outside of the folder and turn the visibility off.

BlankSourceCode commented 5 months ago

@hemkesa By "folders" do you mean groups? The lua implementation for groups is a bit weird, which is why it doesn't work out right now.

Could you give the script from this branch a try and let me know if it works for you.

hemkesa commented 4 months ago

it seems to work! thank you so much, will update you if theres any other issue with this I notice! (: