obs-zoom-to-mouse icon indicating copy to clipboard operation
obs-zoom-to-mouse copied to clipboard

Update deprecated OBS API calls (*_get_info → *_get_info2, *_set_info → *_set_info2)

Open micro-JAY opened this issue 1 month ago • 1 comments

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:

  1. Line 435
  • Replaced deprecated function
  • Corrected a logic error where the script called a get function when it should have been calling set
  1. Line 556
  • Updated deprecated get_info call (this was the direct cause of the reported error)
  1. Line 562
  • Updated another get_info call
  1. Line 611
  • Updated deprecated set_info call

The script now loads and runs normally on OBS 32.0.2 with no errors.

micro-JAY avatar Nov 15 '25 12:11 micro-JAY