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

Can't collapse or uncollapse Parameter SubGroup's programatically #315

Open
latenitefilms opened this issue Dec 29, 2023 · 1 comment
Open

Comments

@latenitefilms
Copy link
Contributor

latenitefilms commented Dec 29, 2023

Apple Feedback Assistant ID: FB13500590

DESCRIBE THE BUG:
You can't use FxParameterSettingAPI_v6 to addFlags or removeFlags to programmatically collapse or uncollapse a Parameter SubGroup in FxPlug. In my case, I wanted to be able to right-click on a clip in the Viewer, and use FxOnScreenControl_v4's mouseUpAtPositionX method to trigger a flag change, so that I can collapse or uncollapse specific SubGroup's.

I've also tried using FxCustomParameterActionAPI_v4 before and after addFlags/removeFlags, but it has no impact.


TO REPRODUCE:
Try and collapse or uncollapse a Parameter SubGroup using FxPlug.


EXPECTED BEHAVIOUR:
You should be able to collapse or uncollapse SubGroup's programmatically.


SCREENSHOTS:
None


SPECS:

  • 2021 16-inch MacBook Pro (M1 Max, 64GB RAM, 8TB SSD)
  • macOS Sonoma 14.1.2
  • Final Cut Pro 10.7.1

ADDITIONAL COMMENTS:
None

@latenitefilms
Copy link
Contributor Author

Interestingly, you can seem to do this via button, so the API is working, but maybe you can trigger it from an OSC?

@objc func pushButton() {
    let setParamAPI = _apiManager!.api(for: FxParameterSettingAPI_v5.self) as! FxParameterSettingAPI_v5
    setParamAPI.setParameterFlags(FxParameterFlags(kFxParameterFlag_COLLAPSED), toParameter: 2)
}

func addParameters() throws {
    let paramAPI = _apiManager!.api(for: FxParameterCreationAPI_v5.self) as! FxParameterCreationAPI_v5

    paramAPI.addFloatSlider(withName: "Brightness", parameterID: 1, defaultValue: 1.0, parameterMin: 0.0, parameterMax: 100.0, sliderMin: 0.0, sliderMax: 5.0, delta: 0.1, parameterFlags: FxParameterFlags(kFxParameterFlag_DEFAULT))

    paramAPI.startParameterSubGroup("Test SubGroup", parameterID: 2, parameterFlags: FxParameterFlags(kFxParameterFlag_DEFAULT))

    paramAPI.addPushButton(withName: "Change Name", parameterID: 3, selector: #selector(pushButton), parameterFlags: FxParameterFlags(kFxParameterFlag_DEFAULT))

    paramAPI.endParameterSubGroup()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant