Skip to content

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

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.

3 participants