obs-zoom-to-mouse
obs-zoom-to-mouse copied to clipboard
Update deprecated OBS API calls (*_get_info → *_get_info2, *_set_info → *_set_info2)
This updates the script to work with OBS 28.0+ by replacing OBS API functions that were removed in newer builds.
What was wrong
The script uses deprecated scene-item API functions that OBS fully removed starting in 28.0: • obs_sceneitem_get_info → replaced with obs_sceneitem_get_info2 • obs_sceneitem_set_info → replaced with obs_sceneitem_set_info2
This caused the script to fail on load with:
Failed to call frontend_event_callback for frontend API
attempt to call field 'obs_sceneitem_get_info' (a nil value)
I replaced all removed API calls with their modern equivalents:
- Line 435
- Replaced deprecated function
- Corrected a logic error where the script called a get function when it should have been calling set
- Line 556
- Updated deprecated get_info call (this was the direct cause of the reported error)
- Line 562
- Updated another get_info call
- Line 611
- Updated deprecated set_info call
The script now loads and runs normally on OBS 32.0.2 with no errors.