[ossia-max] Avoid creating intermediate nodes
@evanmtp is already working on this.
Since Mar 17, 2022.
- Dominant language
- C++
- Stars
- 231
- Forks
- 35
- Avg merge
- 8h 55m
- Merged PRs (30d)
- 14
Description
When an ossia.parameter with a multi-level address is created, ossia creates intermediate nodes for each level of the hierarchy. For example, if an ossia.parameter is created with the address audio/gain/interpolation, the following nodes are created:
device:/model/audio
device:/model/audio/gain
device:/model/audio/gain/interpolation
If another ossia.parameter is then created with the same name as one of these intermediate parameters (e.g. /out/final), it will wind up with a numerical suffix:
device:/model/audio
device:/model/audio/gain
device:/model/audio/gain.1
device:/model/audio/gain/interpolation
This makes it easy to accidentally create duplicate node names, which can cause some confusion when e.g. retrieving values or storing presets.
Please see these demo patches:
My question is: is this auto-creation of intermediate nodes desired or useful behaviour? I don't understand what the purpose of this is, but I may very well be missing something. If it's not necessary for some reason, could this behaviour be prevented?
Possibly related to https://github.com/ossia/libossia/issues/628 and https://github.com/ossia/libossia/issues/559 . Tested with b206e461.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.