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

New FxPlug API FxParameterGroupingAPI_v1 for getting and setting Parameter Groupings #435

Open
belisoful opened this issue Dec 10, 2024 · 0 comments

Comments

@belisoful
Copy link

Apple Feedback Assistant ID: MISSING!

Is your feature request related to a problem? Please describe.

When initializing the plugin and it's parameter structures, reconstructing subgroups is basically impossible without some wizardry.

Describe the solution you'd like

This is information that a FxPlug framework developer would love to have from FxPlug:

// This is the ID of the base SubGroup that all parameters are put into
#define FxPlugRootGroupID 0

@protocol FxParameterGroupingAPI_v1 <NSObject>
- (BOOL)isSubGroup:(FxParameterId) parameterID;   // <-iow, can it act as a Parent Parameter?
- (BOOL)hasSubParameters:(FxParameterId) parameterID;   // <-does parameterID have 1 or more subparameters.

- (UInt32)parameterSubCount:(FxParameterId) parameterID;  //. <- indexes similar to dynamic parameter API
- (FxParameterId) parameterIDAtSubIndex:(UInt32) index fromParameter:(FxParameterId) parameterID;

-(FxParameterId)getParameterSubGroup:(FxParameterId) parameterID; //the ID of the SubGroup containing parameterID
-(BOOL)setParameterSubGroup:(FxParameterId)subGroupID toParameter:(FxParameterId) parameterID;
@end

//This will move the parameter (paramID) from a SubGroup to the root level. 
// It would place the parameter next in line after it's prior subGroup, that's fine.
[groupingAPI setParameterSubGroup: 0 toParameter:paramID];

//Putting a new dynamic parameter into an existing subgroup after the fact would be useful
//  this would physically move the parameter into the subgroup, in motion or if the subgroup is published in FCP.
[groupingAPI setParameterSubGroup:subGroupID toParameter:paramID];

These methods should be immediately available after the SubGroup parameter and sub Parameter are created with FxParameterCreationAPI_v5 and within addParametersWithError.

This satisfies three use cases:

  1. getting the sub parameters of a SubGroup (and count)
  2. putting a dynamically created parameter into a group other than the Root Group for the plugin.
  3. Getting the parent SubGroup parameter ID of a parameter.

This is to reconstruct the Group tree in an FxPlug framework.

Also, it would be very interesting if normal parameters could be a "group" container. So to make a Toggle also be able to act as a group for children parameters, and which would turn them all on or off. In this model, where any parameter can be a group, isGroup doesn't make sense and can be removed.

Describe alternatives you've considered
None.

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

2 participants