mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Add ID renaming superpowers to #[nested(...)]
This can now be used for most common use cases where you previously had to do a manual `Params` implementation, like arrays of parameter objects and duplicate parameter objects.
This commit is contained in:
@@ -154,9 +154,9 @@ pub enum ThresholdMode {
|
||||
/// Contains the compressor parameters for both the upwards and downwards compressor banks.
|
||||
#[derive(Params)]
|
||||
pub struct CompressorBankParams {
|
||||
#[nested = "upwards"]
|
||||
#[nested(group = "upwards")]
|
||||
pub upwards: Arc<CompressorParams>,
|
||||
#[nested = "downwards"]
|
||||
#[nested(group = "downwards")]
|
||||
pub downwards: Arc<CompressorParams>,
|
||||
}
|
||||
|
||||
|
||||
@@ -83,14 +83,14 @@ pub struct SpectralCompressorParams {
|
||||
// can use the generic UIs
|
||||
/// Global parameters. These could just live in this struct but I wanted a separate generic UI
|
||||
/// just for these.
|
||||
#[nested = "global"]
|
||||
#[nested(group = "global")]
|
||||
pub global: Arc<GlobalParams>,
|
||||
|
||||
/// Parameters controlling the compressor thresholds and curves.
|
||||
#[nested = "threshold"]
|
||||
#[nested(group = "threshold")]
|
||||
pub threshold: Arc<compressor_bank::ThresholdParams>,
|
||||
/// Parameters for the upwards and downwards compressors.
|
||||
#[nested = "compressors"]
|
||||
#[nested(group = "compressors")]
|
||||
pub compressors: compressor_bank::CompressorBankParams,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user