1
0
Fork 0

Don't require importing Param for derive macro

This commit is contained in:
Robbert van der Helm 2022-02-12 19:54:46 +01:00
parent befe02cbc1
commit d6b358f8ca
4 changed files with 6 additions and 3 deletions

View file

@ -176,6 +176,9 @@ pub fn derive_params(input: TokenStream) -> TokenStream {
fn param_map( fn param_map(
self: std::pin::Pin<&Self>, self: std::pin::Pin<&Self>,
) -> std::collections::HashMap<&'static str, nih_plug::param::internals::ParamPtr> { ) -> std::collections::HashMap<&'static str, nih_plug::param::internals::ParamPtr> {
// This may not be in scope otherwise
use ::nih_plug::Param;
let mut param_map = std::collections::HashMap::new(); let mut param_map = std::collections::HashMap::new();
#(#param_mapping_insert_tokens)* #(#param_mapping_insert_tokens)*

View file

@ -6,7 +6,7 @@ use nih_plug::{
formatters, util, Buffer, BufferConfig, BusConfig, Editor, IntParam, Plugin, ProcessContext, formatters, util, Buffer, BufferConfig, BusConfig, Editor, IntParam, Plugin, ProcessContext,
ProcessStatus, Vst3Plugin, ProcessStatus, Vst3Plugin,
}; };
use nih_plug::{FloatParam, Param, Params, Range, Smoother, SmoothingStyle}; use nih_plug::{FloatParam, Params, Range, Smoother, SmoothingStyle};
use nih_plug_egui::{create_egui_editor, egui, widgets, EguiState}; use nih_plug_egui::{create_egui_editor, egui, widgets, EguiState};
use std::pin::Pin; use std::pin::Pin;
use std::sync::Arc; use std::sync::Arc;

View file

@ -5,7 +5,7 @@ use nih_plug::{
formatters, util, Buffer, BufferConfig, BusConfig, Plugin, ProcessContext, ProcessStatus, formatters, util, Buffer, BufferConfig, BusConfig, Plugin, ProcessContext, ProcessStatus,
Vst3Plugin, Vst3Plugin,
}; };
use nih_plug::{BoolParam, FloatParam, Param, Params, Range, Smoother, SmoothingStyle}; use nih_plug::{BoolParam, FloatParam, Params, Range, Smoother, SmoothingStyle};
use parking_lot::RwLock; use parking_lot::RwLock;
use std::pin::Pin; use std::pin::Pin;
use std::sync::Arc; use std::sync::Arc;

View file

@ -5,7 +5,7 @@ use nih_plug::{
formatters, util, Buffer, BufferConfig, BusConfig, Plugin, ProcessContext, ProcessStatus, formatters, util, Buffer, BufferConfig, BusConfig, Plugin, ProcessContext, ProcessStatus,
Vst3Plugin, Vst3Plugin,
}; };
use nih_plug::{BoolParam, FloatParam, Param, Params, Range, Smoother, SmoothingStyle}; use nih_plug::{BoolParam, FloatParam, Params, Range, Smoother, SmoothingStyle};
use std::f32::consts; use std::f32::consts;
use std::pin::Pin; use std::pin::Pin;