diff --git a/data_centre/data.py b/data_centre/data.py index 72f858e..c8257f5 100644 --- a/data_centre/data.py +++ b/data_centre/data.py @@ -53,10 +53,6 @@ class Data(object): self.PATHS_TO_SHADERS = [self.PATH_TO_EXTERNAL_DEVICES, '/home/pi/r_e_c_u_r/Shaders', '/home/pi/Shaders' ] self.PATHS_TO_PLUGIN_DATA = [ '/home/pi/r_e_c_u_r/json_objects/plugins', self.PATH_TO_EXTERNAL_DEVICES ] - #initialise plugin manager - self.plugins = plugin_collection.PluginCollection("plugins", message_handler, self) - self.plugins.apply_all_plugins_on_value(5) - ### state data self.auto_repeat_on = True self.function_on = False @@ -107,6 +103,11 @@ class Data(object): docs.generate_mappings_doc("Key mappings", self.analog_mappings, column_one_header="Analogue input") #quit() + def initialise_plugins(self): + #initialise plugin manager + self.plugins = plugin_collection.PluginCollection("plugins", self.message_handler, self) + self.plugins.apply_all_plugins_on_value(5) + def load_midi_mapping_for_device(self, device_name): # check if custom config file exists on disk for this device name custom_file = self.MIDI_MAPPING_JSON.replace(".json","_%s.json"%device_name) diff --git a/data_centre/plugin_collection.py b/data_centre/plugin_collection.py index 12a4012..716bf76 100644 --- a/data_centre/plugin_collection.py +++ b/data_centre/plugin_collection.py @@ -202,7 +202,7 @@ class PluginCollection(object): @property def shaders(self): - return self.message_handler.shaders + return self.actions.shaders @property def actions(self): diff --git a/r_e_c_u_r.py b/r_e_c_u_r.py index d81a95f..5a03e1f 100755 --- a/r_e_c_u_r.py +++ b/r_e_c_u_r.py @@ -54,6 +54,8 @@ display = Display(tk, video_driver, shaders, message_handler, data) actions = Actions(tk, message_handler, data, video_driver, shaders, display, osc_client) message_handler.actions = actions +data.initialise_plugins() + numpad_input = NumpadInput(tk, message_handler, display, actions, data) osc_input = OscInput(tk, message_handler, display, actions, data) midi_input = MidiInput(tk, message_handler, display, actions, data)