Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] SetSceneItemScaleFiltering (and GetSceneItemScaleFiltering) #116

Open
Piripe opened this issue Oct 12, 2022 · 2 comments
Open

[ISSUE] SetSceneItemScaleFiltering (and GetSceneItemScaleFiltering) #116

Piripe opened this issue Oct 12, 2022 · 2 comments

Comments

@Piripe
Copy link

Piripe commented Oct 12, 2022

  • Feature Request

I would like to change (and get) the scale filtering of a scene item,

Thanks in advance!

Versions
OBS Version: 28.0.3
OBS WebSocket Dotnet (this library) Version: 5.0.0.2

@brendan-mccoy
Copy link

In obs-websocket 4.9.1 they added "scale.filter" to SceneItemTransform.

I am not sure if it is the case that they removed it in 5 or this project just doesn't expose it.

@brendan-mccoy
Copy link

Trying to use the normal Filters UI instead of the Scaling Filters menu, I found there is a "Scaling/Aspect Ratio" filter.

Since I'm just trying to apply the filter to (square) pixel art, I naturally set Scale Filtering to "Point" and Resolution to "1:1". Oddly, I can't seem to get any filtering to work on 1:1 in this manner. If I manually set the resolution (say, to the 40x40 of the Pokemon sprite the base image is, though I could set anything), then it works. However, whatever you set here overwrites whatever you've set for SceneItemTransform. Updating SceneItemTransform to whatever you want doesn't appear to modify or break the SourceFilter, so going forward I set the SourceFilter then if say I was using ScaleX and ScaleY (or whatever transforms I like) I set those on SceneItemTransform

So my SourceFilterList on the source appears as follows:

{
  "Name": "Scaling/Aspect Ratio",
  "Kind": "scale_filter",
  "Index": 0,
  "IsEnabled": true,
  "Settings": {
    "resolution": "40x40",
    "sampling": "point"
  }
}

While I would prefer to be able to set the Scale Filtering as part of SceneItemTransform per what they added to 4.9.1, this gets me there.

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

No branches or pull requests

2 participants