obsproject / obsproject/obs-studio

obs_frontend_get_current_preview_scene doesn’t honour Studio Mode’s Program view

Open
#4,649 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
76.4k
Forks
10.2k
Avg merge
4d 23h
Merged PRs (30d)
12

Description

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

26.1.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/IdiFmEctea563Shc

OBS Studio Crash Log URL

No response

Expected Behavior

The two numbers displayed in the Script Log should be different.

Current Behavior

The two numbers displayed in the Script Log are equal.

Steps to Reproduce
  1. Turn Studio Mode on
  2. Turn Duplicate Scene on
  3. Change the horizontal position of an item in the scene that’s currently displayed in the Program view
  4. Run the script
  5. Open the Script Log
Anything else we should know?

Python script to run:

import obspython as obs

def script_update(settings):
    scene_sources = [obs.obs_frontend_get_current_scene(), obs.obs_frontend_get_current_preview_scene()]
    result = []
    for scene_src in scene_sources:
        items = obs.obs_scene_enum_items(obs.obs_scene_from_source(scene_src))
        for item in items:
            pos = obs.vec2()
            obs.obs_sceneitem_get_pos(item, pos)
            result.append(pos.x)
        obs.sceneitem_list_release(items)
    obs.source_list_release(scene_sources)
    print(*result)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided Python script while Studio Mode and Duplicate Scene are enabled, then trace the obs_frontend_get_current_scene and obs_frontend_get_current_preview_scene entry points. Compare their results while editing the Program view; done means the two scene positions reported in the Script Log reflect the distinct Program and Preview scenes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.