Merge branch 'feature_plugins' into feature_plugins_shader_gadgets

This commit is contained in:
Tristan Rowley
2020-02-08 17:32:07 +00:00
3 changed files with 8 additions and 5 deletions

View File

@@ -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)

View File

@@ -202,7 +202,7 @@ class PluginCollection(object):
@property
def shaders(self):
return self.message_handler.shaders
return self.actions.shaders
@property
def actions(self):

View File

@@ -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)