Skip to content

Fix: OBS Zoom to Mouse - Deprecated API Error#75

Open
trinly01 wants to merge 1 commit intoBlankSourceCode:mainfrom
trinly01:fix-missing-obs-sceneitem-get-info
Open

Fix: OBS Zoom to Mouse - Deprecated API Error#75
trinly01 wants to merge 1 commit intoBlankSourceCode:mainfrom
trinly01:fix-missing-obs-sceneitem-get-info

Conversation

@trinly01
Copy link

Fix: OBS Zoom to Mouse - Deprecated API Error

Issue

The script was failing with the error:

attempt to call field 'obs_sceneitem_get_info' (a nil value)

Solution

Updated deprecated OBS API functions to their modern equivalents for compatibility with OBS 27+:

  • Replaced obs_sceneitem_get_info with obs_sceneitem_get_info2 (lines 556, 562)
  • Replaced obs_sceneitem_set_info with obs_sceneitem_set_info2 (lines 435, 611)

Changes Made

  • Line 435: Updated function call when resetting transform info to original state
  • Line 556: Updated function call when capturing original scene item transform info
  • Line 562: Updated function call when getting current scene item transform info
  • Line 611: Updated function call when applying modified bounding box transform

The script now works properly with modern OBS versions (27+) which removed the older API functions.

Eliminated all code, settings, and UI related to the remote mouse UDP socket server. The script now only supports local mouse position detection, simplifying configuration and maintenance. Also updated transform info function calls to use new OBS API and cleaned up related logic.
@sanmoviz
Copy link

Hello!
There is no option for selecting multiple sources.
Screenshot 2025-10-25 100223

@AmitIsMe
Copy link

AmitIsMe commented Dec 2, 2025

Confirming that this fix resolves the obs_sceneitem_get_info API issue on current OBS versions.
This PR restores full functionality to the script and removes a blocker that many users are running into with the latest OBS builds.

Merging this would immediately improve usability for new users and prevent repeated bug reports on the same issue.
Would appreciate moving this forward so the project’s release stays compatible with modern OBS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants