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

FFGLPlugin - SetParamGroup unusable because it need a param index #69

Open
hepiyellow opened this issue Sep 10, 2021 · 1 comment
Open

Comments

@hepiyellow
Copy link

hepiyellow commented Sep 10, 2021

The FFGLPlugin API for adding parameters (FFGLPlugin::AddParam) does not provide the created param index.
And automatically uses the created param index as the param ID in the created ParamInfo.

So, if I want to use the inherited CFFGLPluginManager::SetParamGroup which expected a param ID, I can't, because I don't know the ID.
I can go through the params myself, find the param by name, and get it's index (thus it's ID).

So this is NOT a BLOCKER, but just an incomplete API.

@MennoVink
Copy link
Collaborator

I cant speak for the quickstart classes, maybe @flyingrub can shed some light on this. In CFFGLPluginManager however index, dwIndex and paramID are used interchangeably. I do find this annoying myself as well, it's something that needs to be cleaned up after decades of inheriting code and building on top of it.
What most plugins do is have an enum for their param ids and then add the params in the same order of the enum values. Then you can use the enum values to address the range or group for that param.

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