mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 19:30:11 +01:00
Merge branch 'feature_plugins' into feature_plugins_shader_gadgets
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -202,7 +202,7 @@ class PluginCollection(object):
|
||||
|
||||
@property
|
||||
def shaders(self):
|
||||
return self.message_handler.shaders
|
||||
return self.actions.shaders
|
||||
|
||||
@property
|
||||
def actions(self):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user