Skip to content

HandleSceneItemTransformChanged Event handler fix#1312

Open
vladuskaxgod wants to merge 1 commit intoobsproject:masterfrom
vladuskaxgod:HandleSceneItemTransformChanged_event_fix
Open

HandleSceneItemTransformChanged Event handler fix#1312
vladuskaxgod wants to merge 1 commit intoobsproject:masterfrom
vladuskaxgod:HandleSceneItemTransformChanged_event_fix

Conversation

@vladuskaxgod
Copy link

@vladuskaxgod vladuskaxgod commented Aug 25, 2025

Description

This PR fixes #1295. Unify SceneItemTransformChanged under the general SceneItems subscription:

  • Removed EventSubscription::SceneItemTransformChanged enum value and related _sceneItemTransformChangedRef counter logic.
  • Updated event metadata (@eventSubscription tag) and BroadcastEvent calls to use EventSubscription::SceneItems.
  • Eliminated redundant runtime check that suppressed the event when no dedicated subscribers existed (now covered by normal SceneItems subscription filtering).

Motivation and Context

The SceneItemTransformChanged event was effectively broken: the dedicated ref counter (_sceneItemTransformChangedRef) was never incremented for normal SceneItems subscriptions, so the early ref check caused the handler to return every time. As a result, clients subscribing to SceneItems did not receive transform change events. Removing the unused subscription flag, its ref bookkeeping, and the premature check fixes the dispatch and simplifies the API.

How Has This Been Tested?

  1. Subscribed with SceneItems only; verified SceneItemTransformChanged now received on item move/resize.
  2. Unsubscribed; verified events cease.
  3. Regression: Other SceneItems events (create/remove/select) still delivered.
  4. Monitored for unintended extra events (none observed). Tested OS(s): Windows 11 x64.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • I have read the Contributing Guidelines.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • My code is not on master or a release/* branch.
  • The code has been tested.
  • I have included updates to all appropriate documentation.

@RytoEX RytoEX requested a review from tt2468 September 8, 2025 20:05
@vladuskaxgod
Copy link
Author

@tt2468 bump

@vladuskaxgod
Copy link
Author

@RytoEX bump

Copilot AI review requested due to automatic review settings March 7, 2026 23:04
@vladuskaxgod vladuskaxgod force-pushed the HandleSceneItemTransformChanged_event_fix branch from 59e27fe to d80fe13 Compare March 7, 2026 23:04

This comment was marked as spam.

@Fenrirthviti
Copy link
Member

Please do not request AI reviews of PRs on our repositories.

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.

Bug: SceneItemTransformChanged event not returning anything via websocket

3 participants